Xcode 8 and UIAlertController

Khoa Pham
Indie Goodies
Published in
1 min readOct 24, 2016

--

I name this article this way because it is what I search when I face this problem 😀

I was migrating one project to Swift 3 using Xcode 8, and I get this exception. It runs fine before when I use Xcode 7

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

This is how I show it in my MainController

If I set animated to true, then the alert controller is displayed on top of the screen 😅

This is how I show the MainController

My 1st workaround that works, is to remove supportedInterfaceOrientations

--

--