开发者

Standard way to have a UIBarButtonItem point to the right?

When a new view controller is pushed onto the navigation stack, there is standard support for a back button with the title of the previous view controller. This button "points" to the left rather than having a rounded rectanglar shape.

Is there a standard way to create a UIBarButtonItem that "points" to the righ开发者_Go百科t? This button would be used as the rightBarButtonItem.


Using the Three20 library you can do it easily without creating an image yourself (and it will size up correctly depending on your text):

Standard way to have a UIBarButtonItem point to the right?

This screenshot comes from the example application that comes with Three20.


You could use one of the PNG files floating around with iPhone UI widgets (example). Take the left-pointing button and flip it horizontally in Photoshop or another image editing tool to make it point right-wards.

Then insert a UIButton into the rightBarButtonItem view, using the horizontally-flipped widget as its image property.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜