Set up app themes with appearance

Source: Internet
Author: User
<span id="Label3"></p><span style="font-size: 14px;"><span style="font-size: 14px;"> </span></span><p><p><span style="font-size: 2em;">Resources</span></p></p><p><p>Oschina Source<br>Http://git.oschina.net/oschina/iphone-app<br>Tintcolor parsing<br>http://blog.kingiol.com/blog/2014/01/09/ios7-day-by-day-day6-tint-color/</p></p>Oschina Source Code Analysis<pre class="hljs objectivec"><code class="objectivec"> <span class="hljs-comment">Setting the view controller-based status bar appearance to No in the plist file is effective [[<span class="hljs-built_in">UIApplication sharedapplication] setstatusbarstyle:<span class="hljs-built_in">uistatusbarstylelightcontent];<span class="hljs-comment">The color of the title on the navigation bar<span class="hljs-built_in">Nsdictionary *navbartitletextattributes = @{<span class="hljs-built_in">nsforegroundcolorattributename:[<span class="hljs-built_in">Uicolor whitecolor]}; [[<span class="hljs-built_in">Uinavigationbar appearance] settitletextattributes:navbartitletextattributes];<span class="hljs-comment">Uibarbuttonitem color on the navigation bar [[<span class="hljs-built_in">Uinavigationbar appearance] settintcolor:[<span class="hljs-built_in">Uicolor whitecolor]];<span class="hljs-comment">Tabbar the color of the selected icon, the default is blue [[<span class="hljs-built_in">Uitabbar appearance] settintcolor:[<span class="hljs-built_in">Uicolor colorwithhex:<span class="hljs-number">0x15a230]];<span class="hljs-comment">Tabbaritem the selected color [[<span class="hljs-built_in">Uitabbaritem appearance] settitletextattributes:@{<span class="hljs-built_in">nsforegroundcolorattributename:[<span class="hljs-built_in">Uicolor colorwithhex:<span class="hljs-number">0x15a230]} forstate:<span class="hljs-built_in">uicontrolstateselected];<span class="hljs-comment">The background color of the navigation bar [[<span class="hljs-built_in">Uinavigationbar appearance] setbartintcolor:[<span class="hljs-built_in">Uicolor navigationbarcolor]];<span class="hljs-comment">Tabbar Background Color [[<span class="hljs-built_in">Uitabbar appearance] setbartintcolor:[<span class="hljs-built_in">Uicolor titlebarcolor]]; [<span class="hljs-built_in">Uisearchbar appearance]<span class="hljs-variable">. Tintcolor = [<span class="hljs-built_in">Uicolor redcolor];<span class="hljs-comment">When a class is contained within another class, the appearance is Modified. [[<span class="hljs-built_in">Uitextfield appearancewhencontainedin:[<span class="hljs-built_in">Uisearchbar class],<span class="hljs-literal">nil] setcornerradius:<span class="hljs-number"><span class="hljs-number">14.0]; [[<span class="hljs-built_in">Uitextfield appearancewhencontainedin:[<span class="hljs-built_in">uisearchbar class], <span class="hljs-literal">nil] setalpha:<span class="hljs-number">0.6]; <span class="hljs-built_in">Uipagecontrol *pagecontrol = [<span class="hljs-built_in">uipagecontrol appearance]; pagecontrol<span class="hljs-variable">. pageindicatortintcolor = [ <span class="hljs-built_in"> Uicolor colorwithhex:<span class="hljs-number">0xDCDCDC]; Pagecontrol<span class="hljs-variable">. Currentpageindicatortintcolor = [<span class="hljs-built_in">uicolor graycolor]; [[<span class="hljs-built_in">Uitextfield appearance] settintcolor:[<span class="hljs-built_in">uicolor namecolor]]; [[<span class="hljs-built_in">uitextview appearance] settintcolor:[<span class="hljs-built_in">uicolor namecolor]];</span> </span> </span> </span> </span> </span> </span> </span> </span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></code></pre><p><p>Set up app themes with appearance</p></p></span>

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.