...方法的返回类型就是这个类的实例(例如NSString类中的stringWithFormat:),就可以将这种类方法称为便捷方法(Convenience Method)。简单一点来就,就是相当于C#中的静态方法创建实例,我们经常给这样的函数命名为CreateInstance。
基于34个网页-相关网页
这是一个在文档里移动结点的便捷方法。
This is a convenient way to move nodes around in the document.
Logger类定义了众多产生日志信息的便捷方法。
The Logger class provides a large set of convenience methods for generating log messages.
不再有丑陋的匿名内部类:只要通过这些便捷方法使用闭包就可以!
No more ugly anonymous inner classes: just use closures through those shortcut methods!
应用推荐