Common iOS settings

Source: Internet
Author: User
<span id="Label3"></p><p><p>Uilabel settings</p></p><p><p>@property (nonatomic,copy) nsstring *text;//display text</p></p><p><p>@property (nonatomic,retain) Uifont *font;//font</p></p><p><p>@property (nonatomic,retain) uicolor *textcolor;//text Color</p></p><p><p>@property (nonatomic) nstextalignment textalignment;//alignment mode (left-aligned, center-aligned, right-aligned)</p></p><p><p></p></p><p><p>Uifont represents fonts, common ways of creating</p></p><p><p>+ (uifont *) systemfontofsize: (cgfloat) fontsize;//system default font</p></p><p><p>+ (uifont *) boldsystemfontofsize: (cgfloat) fontsize;//bold</p></p><p><p>+ (uifont *) italicsystemfontofsize: (cgfloat) fontsize;//italic</p></p><p><p></p></p><p><p>Common settings for UIButton</p></p><p><p>-(void) settitle: (nsstring *) title forstate: (uicontrolstate) State;//set The text of the button</p></p><p><p>-(void) settitlecolor: (uicolor *) color forstate: (uicontrolstate) state;//set button Colors</p></p><p><p>-(void) setimage: (UIImage *) image forstate: (uicontrolstate) state;//set The small picture inside the button</p></p><p><p>-(voif) setbackgroundimag: (UIImage *) image forstate: (uicontrolstate) state;//set button background picture</p></p><p><p>Set the text font of the button (you need to get the label inside the button to set It)</p></p><p><p>Btn.titleLabel.font = [uifont systemfontofsize:12];</p></p><p><p>-(nsstring *) titleforstate: (uicontrolstate) state;//get The text of the button</p></p><p><p>-(uicolor *) titlecolorforstate: (uicontrolstate) state;//get button Multi-text color</p></p><p><p>-(UIImage *) imageforstate: (uicontrolstate) state;//get Small picture inside the button</p></p><p><p>-(UIImage *) backgroundimageforstate: (uicontrolstate) state;//get The background picture of the button</p></p><p><p></p></p><p><p>Common iOS settings</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.