IB 构建器还是以编程方式绘制?
你有什么建议?我应该以编程方式绘制我的文本字段、标签、图像还是应该使用 IB?
会有什么不同吗?我有滚动问题(有点生涩),但不是我不能没有的东西!
What do you advise? should I programmatically draw my textfields, labels, images or should I use IB?
Would it make any difference? I have scrolling issues (bit jerky) but not something I cannot live without!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我会使用 IB 来帮助维护该应用程序。性能不稳定通常是内存管理问题造成的,而不是 IB 特有的。 IB 只是创建对象并设置公共属性,因此可以在代码中进行,或者在 IB 中最终结果是创建对象并设置属性。
I would use IB to help maintain the app. Jerky performance is usually a result to memory management issues and not specific to IB. IB just does the object creation and sets common properties, so do it in code, or in IB the end result is the creation of objects and setting of properties.
好的。问题解决了。关于IB,你是对的,也是错的……
解释一下自己:
我正在从 nib 文件加载我的单元格。
技巧和感谢都在这个网站:http://iphoneincubator.com/blog/tag/dequeuereusablecellwithidentifier
我忘记将单元格标识符设置为 nib 文件,因此每次单元格滚出屏幕时我都会创建单元格!
所以小费!
当您从笔尖加载时,始终将正确的标识符放在“标识符”位置!
感谢 nolimitsdude 实际上指出了正确的方法!
ok. problem solved. you were right and wrong regarding the IB...
to explain myself:
I was loading my cell from a nib file.
The trick and thanks goes to this site: http://iphoneincubator.com/blog/tag/dequeuereusablecellwithidentifier
i forgot to set my cell identifier to the nib file so i was creating the cells every time they were scrolled off the screen!
so tip!
When you load from nib ALWAYS put the right identifier in the "identifier" place!!!
thanks to nolimitsdude who actually pointed to the right way!!