Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/danramteke/drtap

.tap from Ruby implemented as a category on NSObject
https://github.com/danramteke/drtap

Last synced: 4 days ago
JSON representation

.tap from Ruby implemented as a category on NSObject

Awesome Lists containing this project

README

        

DRTap
=====

.tap from Ruby implemented as a category on NSObject

Add this line to your Podfile:

pod 'DRTap'

Example:

#import "NSObject+DRTap.h"

// ...

UILabel* label = [[[UILabel alloc] init] tap:^(UILabel* lbl){
lbl.text = @"Hello";
lbl.textColor = [UIColor whiteColor];
lbl.font = [UIFont systemFontOfSize:88];
lbl.backgroundColor = [UIColor blackColor];
[lbl sizeToFit];
}];

[self.view addSubview:label];