beginSheet:阻止替代方案?
Snow Leopard 没有引入一些替代旧的 beginSheet: 方法来允许使用块来完成完成工作吗?我不喜欢在另一个回调方法中使用它。
Didn't Snow Leopard introduce some alternative to the old beginSheet: method that allows using a block to do the finishing stuff? I don't like having it in another callback method.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没关系。我在这两个网站找到了我要找的东西:
http://www.mikeash.com/pyblog/friday-qa-2009-08-14-practical-blocks.html,
http://www.cocoabuilder.com/archive /cocoa/281058-sheets-blocks-and-garbage-collector.html
事实上,这是代码,它与GC和非GC完全兼容:
Never mind. I found what I'm looking for at these two sites:
http://www.mikeash.com/pyblog/friday-qa-2009-08-14-practical-blocks.html,
http://www.cocoabuilder.com/archive/cocoa/281058-sheets-blocks-and-garbage-collector.html
In fact, this is the code, and it's fully compatible with both GC and non-GC: