Skip to content

danramteke/DRTap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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];

About

.tap from Ruby implemented as a category on NSObject

Resources

License

Stars

Watchers

Forks

Packages

No packages published