V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
Elethom
V2EX  ›  分享创造

PREventHandler: 使用 block 优雅地处理 UIAlertView 与 UIActionSheet 的 callbacks

  •  
  •   Elethom ·
    Elethom · 2014-05-16 20:36:39 +08:00 · 3197 次点击
    这是一个创建于 3652 天前的主题,其中的信息可能已经有所发展或是发生改变。
    On blog: http://blog.projectrhinestone.org/preventhandler/
    On GitHub: https://github.com/Elethom/PREventHandler

    欢迎 follow, star 或提交 PR. 请不要滥用 fork 功能或提交无意义的 issues, 谢谢!

    示例:

    https://gist.github.com/Elethom/93db831a555a7e3c66fb
    6 条回复    2014-05-20 10:06:30 +08:00
    newtonisaac
        1
    newtonisaac  
       2014-05-16 20:43:56 +08:00 via iPad
    兄弟,blockskit
    Elethom
        2
    Elethom  
    OP
       2014-05-16 20:52:49 +08:00
    @newtonisaac
    BlocksKit 的代码我有完整读过. 如果你有注意到这个 repo 的 commit history 就会发现这只是一个前后仅用了几个小时的 side project, 目的是研究 UIAlertView 和 UIActionSheet 在 iOS 7 下的 behaviours 同时造个小轮子学习使用 CocoaPods 发布 framework 的方法再顺便给其他开发者提供一个参考.
    newtonisaac
        3
    newtonisaac  
       2014-05-17 00:51:54 +08:00 via iPad
    @Elethom 顿首
    RIcter
        4
    RIcter  
       2014-05-17 09:56:05 +08:00 via iPad
    ....我还以为是alex.....
    shichimiya
        5
    shichimiya  
       2014-05-17 22:05:11 +08:00
    第6行和别的不一样,好难受好难受好难受
    Hysteria
        6
    Hysteria  
       2014-05-20 10:06:30 +08:00
    参数名太多了= - =,不好看啊不好看
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1085 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 19:02 · PVG 03:02 · LAX 12:02 · JFK 15:02
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.