How to click the button to modify the text size

Source: Internet
Author: User

I am currently developing an iphone application. I need to click a button to modify the text size in the tag. I don't know how to implement this function? It should be developed in ios5. Thank you for your advice ~~ Solution: Create UILabel [plain] self. lbl = [[UILabel alloc] initWithFrame: CGRectMake (135,290,200, 35)]; self. lbl. backgroundColor = [UIColor clearColor]; NSString * str = [NSString stringWithFormat: @ "%. f ", [self. slider value]; [self. lbl setFont: [UIFont fontWithName: @ "Arial-BoldMT" size: 16]; self. lbl. text = str; www.2cto.com [self. view addSubview: self. lbl]; when you click UIButton, modify the UILabel text size [plain]-(IBAction) ButtonPressed :( id) sender {[self. lbl setFont: [UIFont fontWithName: @ "Arial-BoldMT" size: 25];}

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.