iPhone : making UIBarButtonItem that is arrow shaped

前端 未结 6 1700
抹茶落季
抹茶落季 2020-12-07 23:36

I have a UIBarButtonItem on a navigation bar. I\'d like to make it arrow shaped. By that I mean I want it to be square except for a pointy side. Does anyone know how to do t

6条回答
  •  不知归路
    2020-12-08 00:28

    Make a custom background. See Creating a left-arrow button (like UINavigationBar's "back" style) on a UIToolbar for how.


    You may -pushNavigationItem:animated: to make the built-in back button appear, although you cannot assign custom actions to it.


    For undocumented methods, you may use

    UIButton* backButton = [UIButton buttonWithType:101];
    

    to create a back "button".

提交回复
热议问题