Search code examples
iosobjective-cmaster-detail

Why the above statement is not being executed first


i have used master-detail view in my application. enter image description here

when videos row is selected in master view , the videos method is called and it is as shown above, in the videos method i am writing code to dismiss the popover and calling a method fetchvideosfromurl: , but during execution the method fetchvideosfromurl is being executed first and after that the popover dismisses, but i want the popover to be dismissed before the method is called, how to do it. Thank you


Solution

  • you can do the following:

    -(void)videos { [popover dismissPopoverAnimated:NO]; [self performSelector(loadUrl) withobject:nil afterDelay:2.0];

    }

    -()loadUrl { //code in the following Image }

    enter image description here

    hope this will help you.