Is it possible to create button
to be like one in ios 7
on prior versions of ios
? I want my button
just to show text, and not to be white rectangle or blue when selected.
try this ...
UIButton * btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setTitle:@"text" forState:UIControlStateNormal]
If you are using Interface builder then just drag a button in to the view and in the Attributes inspector select type as custom and just add the required text in the placeholder. Else if you are creating buttons programatically then
UIButton *buttonName = [UIButton buttonWithType:UIButtonTypeCustom];
[buttonName setTitle:@"Some Text" forState:UIControlStateNormal];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.