开发者

View Controllers in cocoa

开发者 https://www.devze.com 2023-01-31 22:18 出处:网络
When you instantiate a new view control开发者_如何学Pythonler is it faster to create the objects present within, in code like [UIButton buttonWithType:] and [self.view addSubView:] or by loading them

When you instantiate a new view control开发者_如何学Pythonler is it faster to create the objects present within, in code like [UIButton buttonWithType:] and [self.view addSubView:] or by loading them from a nib/xib file.


Earlier the first way was definitely faster, but with iOS 4 and UINib caching it depends on how often do you hit the cache.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号