IOS navigation bar style

Source: Internet
Author: User

 

The navigation controller can display itself in several different styles. The default style is the standard gray appearance. Currently, three different styles are supported.

Fengge

Description

Uibarstyledefault

Default style; gray background, white text

Uibarstyleblack

Black background, white text

Uibarstyleblackopaque

Black background, white text

Uibarstyleblacktranslucent

Transparent black background, white text

The style is set through the barstyle attribute. This attribute belongs to the navigation controller rather than the View Controller. Therefore, this attribute can be consistent during back-and-forth switching between views:

Self. navigationcontroller. navigationbar. barstyle = uibarstyleblacktranslucent;

The original IOS documents are as follows:

Uibarstyle
Defines the stylistic appearance of different types of views.

Typedef Enum {
Uibarstyledefault = 0,
Uibarstyleblack = 1,
 
Uibarstyleblackopaque = 1, // deprecated
Uibarstyleblacktranslucent = 2, // deprecated
} Uibarstyle;
Constants
Uibarstyledefault
Use the default style normally associated with the given view. For example, search bars and tool bars typically use a blue gradient background.
Available in IOS 2.0 and later.
Declared in uiinterface. h.


Uibarstyleblack
Use an opaque black style.
Available in IOS 3.0 and later.
Declared in uiinterface. h.


Uibarstyleblackopaque
Deprecated. Use uibarstyleblack instead.
Available in IOS 2.0 and later.
Declared in uiinterface. h.

Uibarstyleblacktranslucent
Deprecated. Use uibarstyleblack and set the translucent property to yes instead.
Available in IOS 2.0 and later.
Declared in uiinterface. h.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.