HTBlock 0.1.0

HTBlock 0.1.0

测试已测试
语言语言 Obj-CObjective C
许可 MIT
发布时间上次发布2014年12月

Geonu Choi维护。



HTBlock 0.1.0

  • 作者:
  • Geonu Choi

一些 UIKit 的 block 功能扩展。

如何使用

只需将源代码复制/链接到您的项目中,使用它!使用起来非常简单。

您也可以使用 CocoaPods 安装 HTBlock。

`pod 'HTBlock', '~> 0.1.0'`

示例

  • UIAlertView

    [[[UIAlertView alloc] initWithTitle:@"Title"
                                message:@"Message"
                      cancelButtonTitle:@"No"
                      otherButtonTitles:@[@"Yes"]
                           dismissBlock:^(UIAlertView *alertView, NSUInteger buttonIndex) {
                            if (buttonIndex == alertView.cancelButtonIndex) {
                                return;
                            } else {
                                NSLog(@"YES");
                            }
    }] show];
    
  • UIControl

    [button addTargetBlock:^(id sender) {
        NSLog(@"Button Pressed");
    } forControlEvents:UIControlEventTouchUpInside];