开发者

Calling UITableView's cellForRowAtIndexPath: for just one iteration

When attempting to create a form with UITextFields, it appears that cellForRowAtIndexPath: gets called every time a user scrolls up and down the tableView. When this happens, a new UITextField is created, and the old UITextFields are no开发者_运维问答 longer visible. Is there a way for the cellForRowAtIndexPath: method to be called for just one iteration?


Check the docs for UITableViewCell, especially A Closer Look at Table-View Cells and the section about static cell content.


Perhaps you might consider a simple UIScrollView rather than a UITableView? It's difficult to tell what you're trying to accomplish here. Perhaps add a bit more detail to your question.


Create UITableViewCell nibs in Interface Builder with UITextFields and link all of the objects with the viewController class.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜