StefanLage / SLPagingView

Navigation bar system allowing to do a Tinder like or Twitter like
MIT License
1.01k stars 85 forks source link

Use without auto layout? #10

Closed komocode closed 9 years ago

komocode commented 9 years ago

Wondering if we can use this without auto constraints? I'm going to be targeting only the iPhone 5 screen so using autoresizing masks (springs/struts) is much faster than setting up constraints.

I tried using it without auto constraints, but I'm getting this error:

The view hierarchy is not prepared for the constraint: <NSLayoutConstraint:0x7d166fe0 H:[UIView:0x7d160ef0]-(0)-[UIView:0x7d161970]>
    When added to a view, the constraint's items must be descendants of that view (or the view itself). This will crash if the constraint needs to be resolved before the view hierarchy is assembled. Break on -[UIView _viewHierarchyUnpreparedForConstraint:] to debug.
Assertion failure in -[UIScrollView _layoutEngine_didAddLayoutConstraint:roundingAdjustment:mutuallyExclusiveConstraints:], /SourceCache/UIKit_Sim/UIKit-3318.16.14/NSLayoutConstraint_UIKitAdditions.m:560
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Impossible to set up layout with view hierarchy unprepared for constraint.'
StefanLage commented 9 years ago

Therefore I think I'll put an option to use or not the AutoLayout

StefanLage commented 9 years ago

Hi @komocode, you should now be able to use it with or without auto layout 4a4710196e9c7bc4d350cd2a735c691563b0570f

komocode commented 9 years ago

thanks a bunch!