iOS 7 UIToolBar Overriding With Status Bar

前端 未结 6 1445
你的背包
你的背包 2020-12-06 07:20

I have upgraded my project from iOS 6 to iOS 7 but there seems a little problem. The status bar and a tool bar is overriding and very close to each other. The tool bar was e

6条回答
  •  时光取名叫无心
    2020-12-06 07:57

    I was trying to do pretty much the same thing, but I didn't like the white status bar of the accepted answer. I managed to make the toolbar placed underneath the status bar so that it has a consistent color to the Navigation Bar that is next to it in the Master view.

    My solution was to make the Toolbar 64 points tall and set the Topspace to the superview to 0.

    When doing this you have to make sure you are not creating the constraint to the Top Space Layout Guide. I was able to get that done in Interface Builder by setting the Frame to 0,0 with a Height of 64. Then I used the Pin dialog off of the floating tool menu. I used zero with the top I beam to create the constraint.

    The bottom edges match in the Master and Detail and the coloring is consistent. The controls in my toolbar ended up uncrowded.

提交回复
热议问题