Closed Piero87 closed 9 years ago
Are you conforming to UIBarPositioningDelegate
(or DZNSegmentedControlDelegate
)? And have you implemented the -positionForBar:
delegate method in your viewcontroller?
i have not implemented positionForBar, thanks!
You don't need to conform to the protocol if you don't want to change the default bar positioning.
how can i not conform to the protocol? in my uiviewcontroller i have also UISearchBarDelegate, and now give me this error:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UIBarPositionBottom not supported by UISearchBar'
in the code i have implemented this:
- (UIBarPosition)positionForBar:(id <UIBarPositioning>)view
{
return UIBarPositionBottom;
}
because i found it in the Sample project of DZNSegmentedControl
<DZNSegmentedControlDelegate>
positionForBar:
. Anyway, UIBarPositionBottom
is the default value.
Hi, i have tried to use your project in my app, in viewDidLoad i do this:
but the app crash when set the delegate, and give me this error:
how i can solve?