devonboyer / DBProfileViewController

A customizable library for creating stunning user profiles.
MIT License
15 stars 3 forks source link

Crash when numberOfContentControllersForProfileViewController is 1 #26

Open francesc-o opened 7 years ago

francesc-o commented 7 years ago

When I try to use DBProfileViewController with only one contentController (so with hidden segmented control) the app crash. Even with the example project there's the same issue, and even if the hidesSegmentedControlForSingleContentController property is set to NO. The error is: [LayoutConstraints] The view hierarchy is not prepared for the constraint: <NSLayoutConstraint:0x60800028f5f0 V:[_UILayoutGuide:0x7fed36647e00]-(>=0)-[DBProfileSegmentedControlView:0x7fed36619540] (inactive)> and Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Impossible to set up layout with view hierarchy unprepared for constraint.' Any suggestion to fix it @devonboyer ? Thanks