开发者

Table view scroll issue when there's a "modal loop code"

I've a problem with a U开发者_如何学PythonITableView scroll. In a view controller, I add my tableview and show it with presentModalViewController. The user has to select an item in the tableview before they can continue, and so the code must block waiting the selection. I've used a loop like this:

while (!itemSelected)
{
    [[NSRunLoop mainRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
}

It works fine, but the table view doesn't scroll right. When you drag it it's all ok. When you release your finger the table is not redraw. I'm going crazy for this!!!

Please help.


You shouldn't need that while loop. If you've shown this table view as a modal view, there is no way for the user to do anything else until you dismiss the view.

Is there some other detail that we should be aware of so that people on StackOverflow better understand your situation?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜