0

I've a problem with a UITableView 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.

Mike Hay
  • 2,828
  • 21
  • 26
Matteo
  • 39
  • 6

1 Answers1

0

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?

Mike Hay
  • 2,828
  • 21
  • 26
  • I have a function, "Select customer". This function returns a Customer item. So when in my application I need to ask user to select a customer I call this function. When I call it I need to stop the code execution cause I need a customer or a null value to be returned. I use the while loop also when I want present user an alertView to get a selection input. I come from a .NET developing system in windows and modal blocking dialog are very simple to manage. The while loop does the same work but whith tableview I have the scroll problem. Can you help me? – Matteo Sep 04 '11 at 20:47