Вопрос

How do I create a toolbar that is merged with the status bar at the top in iOS7, like in the Safari app? This can be easily achieved using a UINavigationBar, however, an UIToolbar is needed.

Safari's toolbar in iOS 7

Это было полезно?

Решение

I'm assuming that you've already got a toolbar at the top, but that it's 44pts high instead of 64pts as you'd like. If that's the case, then you need to set the bar's barPosition property to UIBarPositionTopAttached.

Другие советы

This is only for UINavigationController and its UINavigationBar.

You should use a navigation controller even if you're not pushing/popping.

Create a properly sized background image for the Toolbar. Check out Apple's iOS7 UI Transition Guide for all the details.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top