onmyway133 / notes

:notebook_with_decorative_cover: Issues and solutions I found during development, mostly iOS
https://onmyway133.com/
MIT License
62 stars 4 forks source link

UIAlertController #237

Open onmyway133 opened 7 years ago

onmyway133 commented 7 years ago

Assertion failure in -[_UIAlertControllerAnimatedTransitioning _animateTransition:completionBlock:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3599.6/_UIAlertControllerTransitioning.m:146

UIAlertController is expected to have a visual style during transitioning

  • Solution 1: Remove supportedInterfaceOrientations
  • Solution 2: Set a dummy UIViewController just before
window?.rootViewController = UIViewController()
window?.rootViewController = MainController()
public var window: UIWindow?
ChenReason commented 7 years ago

Thanks, it does work! Buy why?

onmyway133 commented 7 years ago

@ChenReason Hi, the culprit is this https://medium.com/@onmyway133/xcode-8-and-uialertcontroller-87c4f599e21