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?
1 Answer
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
});
-
*** 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