1
Im пытается уволить segue, если ориентация находится в пейзаже или на портрете. Это то, что я использую, но это дает мне необоснованную ошибку выбора. Может кто-то указать мне верное направление?Swift, Fire segue on Orientation rotation
viewDidLoad(){
UIDevice.currentDevice().beginGeneratingDeviceOrientationNotifications()
NSNotificationCenter.defaultCenter().addObserver(self, selector: "showScoreCard:", name: UIDeviceOrientationDidChangeNotification, object: nil)
}
func showScoreCard {
let deviceOrientation = UIDevice.currentDevice().orientation
if UIDeviceOrientationIsLandscape(deviceOrientation){
self.performSegueWithIdentifier("scorecardSegue", sender: self)
}
Большое спасибо! Я не знал этого о толстой кишке. Ты жжешь! – candidaMan