开发者

Why I can't add left bar button item to Navigation Item through Interface Builder?

It only allows me to add the right barbutton, but when I drag another barbuttonitem, it's simply denied. I looked at the properties of NavigationItem, and I saw that there are outlets for right barbutton and even for the back barbutton. So: why can't I add a left barbutton item to the Navigation Item开发者_开发问答 (through Interface Builder)?


Yeah, using it programatically is probably (way) better. Use [self.navigationController pushViewController:<otherviewname> animated:YES]; This way, in the next view, there is a backbutton to this screen added automatically (unless you decide to hide the backbutton programatically in that next view, but that's a whole different story). The advantage of pushViewController instead of modalTransitionView is that navigation-options are so easily added!


It seems that you cannot add a button to a Navigation Bar if it is defined in the View properties, however if you add a Navigation Bar from the Object Library you can add buttons (left and right).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜