Adding UIToolbar with two UIBarButtonItem to a UINavigationBar: poor UIToolbar and what about iPhone 4

后端 未结 4 1383
野性不改
野性不改 2021-02-04 16:54

I\'m following the second tip from here. In this tip two UIBarButtonItems are put together in a UIToolbar. Finally, the UIToolbar is added to the UINavigationBar. Now to my prob

4条回答
  •  走了就别回头了
    2021-02-04 17:27

    An UIToolbar is designed to be used at the bottom of Iphone screen, so if you use somewhere else it will try to make an edge effect on top side. To avoid this the toolbar height should be 2 pixels bigger then Navbar height. Bu this time you will have a different side effect which causes an edge clear on the bottom side of the navbar. (The navbar in any case locates the rightbarbuttonitem as aligned in the middle)

提交回复
热议问题