back button on navigation toolbar not clickable until it finish complete processing of current view
i have a view which has uinavigationcontroller with back button. On viewWillAppear method i am calling a web service and bind the data in table view, it take some time to bind the data. In me开发者_如何转开发antime user click back button it doesn't move to the previous view till it finish complete binding of table. how can i move to previous view till processing current view.
Load the web service in a new thread. Use the following code example to guide you:
[NSThread detachNewThreadSelector:@selector(aMethod:) toTarget:self withObject:nil]
You are likely loading the data synchronously. You should look into handling web requests in the background, and then update the UI in the main tread when your data is ready. (look into a library called ASIHttpRequest which can help with the web requests.)
精彩评论