kodeco.com Forums

RWDevCon 2016 Session 301: Advanced Auto Layout

iPhone 4S, 5, 6, 6 Plus, iPad, and iPad Pro, oh my! With each cool new device Apple announces, it becomes more important to use Auto Layout in your apps. In this session, you’ll learn what’s going on behind the scenes with Auto Layout, and how to make layouts work with UIStackView and UIScrollView too.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/1290-rwdevcon-2016-session-301-advanced-auto-layout

When I run the starter demo app, it crashed immediately and the output in console is like this:

2016-10-25 14:25:19.632750 RWVideoBrowser[20608:5586913] *** Assertion failure in -[_UIFlowLayoutSection computeLayoutInRect:forSection:invalidating:invalidationContext:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3599.6.1/UIFlowLayoutSupport.m:823
2016-10-25 14:25:19.633546 RWVideoBrowser[20608:5586913] *** Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘UICollectionViewFlowLayout internal error’
*** First throw call stack:
(0x1816741c0 0x1800ac55c 0x181674094 0x1820fe82c 0x187e261d8 0x187dd58a4 0x1815611a4 0x181561010 0x187dd5698 0x187dd5a30 0x187631448 0x18751a39c 0x187519984 0x187519384 0x1874ba54c 0x18498240c 0x1849770e8 0x184976fa8 0x1848f3c64 0x18491b0d0 0x18491baf0 0x1816217dc 0x18161f40c 0x18154e068 0x1875285dc 0x187523360 0x1000ab09c 0x1805305b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

Any idea what happens here? I didn’t change anything in the code except converting them from swift 2 to swift 3 by Xcode automatically.