简体   繁体   中英

a button style like in addressbook and ibooks

I'd like to style my buttons like apple does in addressbook and ibooks for example (light grey boarder, small rounds...). how can I achieve that?

I think your are referring to a UITableViewCell when it is in its grouped table style format.

Create a UITableView and change it to the grouped style mode. Then each cell will be rounded, with a gray border. Here is the code for changing it:

UITableView* tableView = [UITableView alloc] initWithFrame:(your frame) style:UITableViewStyleGrouped];

You can also do this in Interface Builder under the Table View's properties. Now add data to the Table View and it's cells will appear how they do in Address Book and iBooks.

You need a UIButton. Text color should be [UIColor grayColor] the border color should be [UIColor grayColor] and the background should be [UIColor clearColor]

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM