I have custom UINavigationBar
and it's currently look like this:
I want to make the bar items at top position and the UISegmentControl
at the bottom.
I try so far this in layoutSubviews
method:
NSArray *classNamesToReposition = @[@"UINavigationButton"];
for (UIView *view in [self subviews]) {
if ([classNamesToReposition containsObject:NSStringFromClass([view class])]) {
CGRect frame = [view frame];
frame.origin.y -= 100;
[view setFrame:frame];
}
}
But I feel like it's a hack and not the proper way (since UINavigationButton
is private API :/ )
How can I make the bar items not stick to the bottom on the UINavigationBar
?
Note: I m aware of Apple's example