开发者

iOS: Back toolbar bar button item

开发者 https://www.devze.com 2023-03-06 07:23 出处:网络
I need the back arrow toolbar bar button item. In identifier of bar button item, there is play, refresh, reload, and stop.

I need the back arrow toolbar bar button item.

In identifier of bar button item, there is play, refresh, reload, and stop.

I need the image of play, but flip开发者_如何学Goped 180 degrees.

Is there a way to flip the image with code? If not, where can I find this image?


here's a simple work around: declare your button with "initWithTitle" and set the title to @"◀" (it's just a unicode symbol). Use @"▶" for the forward button to make it consistent. I tried it and it worked for me.


Do a Google search for play button vector graphic. Make the one you want the image of the button. Should still be able to tell the button to maintain it's bar button style.


One straightforward option is to draw a white triangle of the appropriate size and orientation in an image editor, stick it in an image view, and then use that image view for a bar button item's custom view.

I wouldn't try to use the UIBarButtonSystemItemPlay image. I don't know if manipulating system images is expressly proscribed, but Apple generally doesn't smile on misuse of system items. When you get right down to it, it's just a white triangle, so it'd be hard to tell the difference between drawing your own or reversing theirs. That just seems like all the more reason to draw your own.

0

精彩评论

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