How can I change the position of a UIBarButtonItem in a UINavigationBar? I would like my button to be about 5px higher than its normal position.
Init UIBarButtonItem with custom view and overload layoutSubviews in custom view, like this
UIBarButtonItem
layoutSubviews
-(void) layoutSubviews { [super layoutSubviews]; CGRect frame = self.frame; CGFloat offsetY = 5; frame.origin.y = (44 - frame.size.height) / 2 - offsetY; self.frame = frame; }