I get a EXC_BAD_ACCESS with viewWillTransitionToSize in Xcode 7. the solution posted here EXC_BAD_ACCESS with viewWillTransitionToSize and Xcode 6.3 worked up untill I upgraded to XCode 7.
override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator)
{
super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator)
if let safeCoordinator = coordinator as UIViewControllerTransitionCoordinator?
{
// Error: EXC_BAD_ACCESS here
print("coordinator != nil")
safeCoordinator.animateAlongsideTransition({ context in
self.tableView.frame = CGRectMake(0, 0, size.width, size.height)
}, completion: nil)
} else {
print("coordinator == nil")
}
}
Any help will be appriciated.