开发者

increase font size in setting in my application

开发者 https://www.devze.com 2023-02-12 18:37 出处:网络
in my application i have to make settings button in tabbar .so using this setting i want to increase or d开发者_如何学Cecreases size of my text view or labelso how i can do that.please help mefirst yo

in my application i have to make settings button in tabbar .so using this setting i want to increase or d开发者_如何学Cecreases size of my text view or label so how i can do that.please help me


first you can use NSUserDefaults for save your settings (font size) see this link:

http://iphone.zcentric.com/2008/08/20/using_nsuserdefaults/

and then use

[myControl setFont:[UIFont fontwithName:@"fontname" size:fontSize]];

where fontsize is fetch from the NSUSerDefaults


You can specify the font of just about any text control (UILabel, UITextView, UITextField) this way:

[myControl setFont:[UIFont fontwithName:@"fontname" size:fontSize]];
0

精彩评论

暂无评论...
验证码 换一张
取 消