Frage

Hi I am new to iOS development, and my app i am working on is allow users to log in to the server by using web services, and after the user logged in, he will get a list of the books he's allowed to access and then he select one and do what he needs to do after that.

So here is my problem. There is a "Sign In" button on the main view. After he click the button "Sign In", a modal view poped up asking him to fill in his username/password. I set up the main view controller to be the delegate so that the modal view controller can pass the credentials to the main view controller. After the log in information passed, the main view controller will dismiss the sign in view controller and connect to a server to verify user account. As the response, the server send back a list of book objects. Here I want to use a modal view to populate a UITableView with the book list to let user select from. So in the - (void)parserDidEndDocument:(NSXMLParser *)parser method in main view controller, I put the code to generate and show the second modal view with the book list, and it doesn't show no matter what I do. I know I did get the book list and I know the code to populate the second modal view got executed, but the second modal view just not show.

I read some related questions here and no matter how I dismiss the first modal view, the second one was not shown at all.

War es hilfreich?

Lösung

Actually I found a solution to it even though it is not a pretty solution at all. All I have to do is just set the dismissModalViewControllerAnimated to NO for the first modal view I dismissed and then I can have my second modal view shown up. I saw somebody used timer but that didn't work for me at all.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top