Ios-ui-uilable

Source: Internet
Author: User

// for text display

UILabel * label = [[UILabel alloc] initwithframe:cgrectmake( , (+,- )];

// use color picker to customize colors

Label. backgroundcolor = [uicolor colorwithred:255.f Green:124 /255.0 Blue:248/255.0 Alpha:1];

Label. text = @ " I come from China, this is a beautiful place "; text

Label. textcolor = [uicolor whitecolor]; font Color

Label. font = [uifont systemfontofsize:]; system font Size

//label.font = [uifont boldsystemfontofsize:18];// system font plus black thick

// custom fonts

//Label.font = [Uifont fontwithname:<# (NSString *) #> size:<# (cgfloat) #>];// Custom font, the first parameter represents a font name, The second parameter represents the size of the

Label. numberoflines = 0; line break Settings (0 means default is not valid )

Label. Linebreakmode = nslinebreakbycharwrapping; ( multiple ) newline style (line break mode)

Label. textalignment = nstextalignmentleft; Alignment (Snap to Alignment)

// need to activate (Allow action) to set text

Label. Shadowcolor = [uicolor blackcolor]; Shadow Color of text (Shadow Shadow)

Label. shadowoffset = cgsizemake(2, 2); Shadow offset of text

Label. enabled = NO; is active, default YES

// Settings tab

Label. tag = 1;

//label.transform = cgaffinetransformmakerotation (0.4);// Set text tilt level (transform transform)

[self. View addsubview: label];

[self setlabeltext];

}

set up new text replacement

-(void) setlabeltext{

// get the corresponding view of the label

//UILabel *label = (UILabel *) [Self.view viewwithtag:1];

//label.text = @ " new text ";

}

Ios-ui-uilable

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.