The label for iOS development

Source: Internet
Author: User

Text Sunken Effect

UILabel *label = [[UILabel alloc] Initwithframe:cgrectmake (Ten, ten, +) ];

Label.text = @ "text sunken effect";

Label.shadowcolor = [Uicolor colorwithred:0.855 green:0.863 blue:0.882 alpha:1.0];

Label.textcolor = [Uicolor colorwithred:0.298 green:0.337 blue:0.424 alpha:1.0];

Label.backgroundcolor = [Uicolor Cyancolor];

[MainView Addsubview:label];

[Label release];

Text Shadow Effect

UILabel * label = [[UILabel alloc] Initwithframe:cgrectmake (Ten, ten, +) ];

Label.text = @ "text shadow effect";

Label.textcolor = [Uicolor colorwithred:0.4 green:0.6 blue:0.1 alpha:1.0];

Label.textalignment = Uitextalignmentcenter;

Label.font = [Uifont fontwithname:[[uifont familynames] objectatindex:2] size:35];

Label.adjustsfontsizetofitwidth = YES;

Label.numberoflines = 0;

Label.tag = 0;

Label6.backgroundcolor = [Uicolor Cyancolor];

Label.shadowcolor = [Uicolor Yellowcolor];

Label.shadowoffset = Cgsizemake (3, 3);

[MainView Addsubview:label];

[Label release];

Label Chinese text Marquee effect

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

Label.text = @ "Chatter, the chatter, chatter chatter, chatter, chatter, chatter, chatter ~ ~ ~";

[Self.view Addsubview:label];

CGRect frame = label7.frame;

frame.origin.x =-180;

Label.frame = frame;

[UIView beginanimations:@ "Testanimation" context:null];

[UIView setanimationduration:8.8f];

[UIView Setanimationcurve:uiviewanimationcurvelinear];

[UIView setanimationdelegate:self];

[UIView Setanimationrepeatautoreverses:no];

[UIView setanimationrepeatcount:999999];

frame = Label.frame;

frame.origin.x = 350;

Label.frame = frame;

[UIView commitanimations];

Recently in doing some of the results of the label text, from the Internet to collect some, if there are other will continue to join. Please give us a lot of advice

Original address: http://blog.sina.com.cn/s/blog_833996210100w7tu.html

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.