uibarbuttonitem

How to Edit Empty Spaces of Left, Right UIBarButtonItem in UINavigationBar [iOS 7]

試著忘記壹切 提交于 2019-11-26 05:16:22
问题 I was using iOS 6.1 earlier, but now I have moved to iOS 7. Along with other problems, I have observed that in my navigation bar, the left space of left bar button item and right empty space of the right button bar item are quite more in IOS 7 than in iOS 6. I need to know is there a way I can reduce empty spaces of left, right bar button items in navigation bar?? Thanks in advance. 回答1: I was also facing this problem. I also have feelings that in iOS 7 there is more space. And I figured out

Setting action for back button in navigation controller

一曲冷凌霜 提交于 2019-11-26 00:23:26
问题 I\'m trying to overwrite the default action of the back button in a navigation controller. I\'ve provided a target an action on the custom button. The odd thing is when assigning it though the backbutton attribute it doesn\'t pay attention to them and it just pops the current view and goes back to the root: UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle: @\"Servers\" style:UIBarButtonItemStylePlain target:self action:@selector(home)]; self.navigationItem