If you use RGB for background colors in iOS

Source: Internet
Author: User
<span id="Label3"></p><p><p>In the process of development, we often encounter pictures of a lot of situations, at this time our program packaging will become very large, some solid color pictures can be implemented with rgb, this can reduce the memory consumption of MAC has digital color meter This function, through this we can get pictures of rgb,</p></p><p><p></p></p><p><p>#import <UIKit/UIKit.h><br><br>@interface Uicolor (Pattern)<br><br><span style="color: #ff0000;">+ (uicolor *) wqd_maincolor;</span><br><br><span style="color: #ff0000;">+ (uicolor *) wqd_viewcolor;</span><br><br>@end</p></p><p><p>#import "uicolor+pattern.h"<br><br>@implementation Uicolor (Pattern)<br><span style="color: #ff0000;">+ (uicolor *) wqd_maincolor{</span><br><span style="color: #ff0000;">return [uicolor colorwithred:0/255.0 green:91/255.0 blue:255/255.0 alpha:1.0];</span><br><span style="color: #ff0000;">}</span><br><br><span style="color: #ff0000;">+ (uicolor *) wqd_viewcolor{</span><br><span style="color: #ff0000;">return [uicolor colorwithred:245/255.0 green:245/255.0 blue:245/255.0 alpha:1.0];</span><br><span style="color: #ff0000;">}</span><br>@end</p></p><p><p></p></p><p><p>It is OK to call the class method directly with the header File.</p></p><p><p><span style="color: #ff0000;">[[uinavigationbar Appearance]setbartintcolor:[uicolor wqd_maincolor]];</span></p></p><p><p>If you use RGB for background colors in iOS</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.