-1

I am trying to navigate one view controller to another view controller by using storyboard sheet segues, but it doesn't worked I took View1 and view 2 while navigating view1 to view2 it works well but after navigating view2 to view1 my GUI is freezing. I think this problem arises because of thread synchronisation, So how can I manage this?

check my code in screenshot
enter image description here

2
  • 1
    Please share your code.
    – Aamir
    Commented Mar 27, 2016 at 8:16
  • i added link of screenshot please check it Commented Mar 27, 2016 at 9:04

1 Answer 1

1

GUI related code should always be performed from the main queue, otherwise, it may not be performed immediately or not at all for that matter.

dispatch_async(dispatch_get_main_queue(), ^{
    // Do anything GUI/view related in the main queue
});
1
  • *** Assertion failure in -[NSWindowGraphicsContext reenableDisplayPosting], /SourceCache/AppKit/AppKit-1348.17/GraphicsContext.subproj/NSWindowGraphicsContext.m:132 2016-03-27 15:02:05.760 ANT_OBJ[2916:120691] An uncaught exception was raised 2016-03-27 15:02:05.761 ANT_OBJ[2916:120691] Invalid parameter not satisfying: _displayPostingDisableCount > 0 2016-03-27 15:02:05.761 ANT_OBJ[2916:120691] ( 0 CoreFoundation ,this exception is caught after using this method Commented Mar 27, 2016 at 9:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.