ios - EXC_BAD_ACCESS with viewWillTransitionToSize and Xcode 6.3 -


this code used work in our today extension, exc_bad_access using xcode 6.3. new problem?

override func viewwilltransitiontosize(size: cgsize, withtransitioncoordinator coordinator: uiviewcontrollertransitioncoordinator) {     coordinator.animatealongsidetransition({ context in         self.tableview.frame = cgrectmake(0, 0, size.width, size.height)         }, completion: nil) } 

someone mentioned me think apple bug. here's workaround (or solution):

override func viewwilltransitiontosize(size: cgsize, withtransitioncoordinator coordinator: uiviewcontrollertransitioncoordinator) {     super.viewwilltransitiontosize(size, withtransitioncoordinator: coordinator)      if let safecoordinator = coordinator uiviewcontrollertransitioncoordinator?     {         println("coordinator != nil")         safecoordinator.animatealongsidetransition({ context in             self.tableview.frame = cgrectmake(0, 0, size.width, size.height)             }, completion: nil)      }     else     {         println("coordinator == nil")     } } 

Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -