简体   繁体   中英

What controls does the built-in contacts app use?

In iOS, the built-in contacts app looks similar to what's displayed on this example page . What controls are being used to create the initial view? Is it a table view? If so, how is the image on the left offset from the two rows?

What's happening behind the scenes to switch this view into edit mode? Are labels being replaced with textboxes or are the textboxes simply being set to editable?

这看起来像UITableViewStyleGrouped风格的iOS7 UITableView ,可能是一个处理图像的自定义单元格。

There are 2 ways to do things like this that I know


#1. That is UI TableView, but TableView with a custom TableView Header.

Also it is UITableViewStyleGrouped Just Init and setup the view include a UIImageView On the left side and three UITextField on the right side. like this

|----------| |---TextField---|
|---Image--| |---TextField---|
|----------| |---TextField---|

and set this view with:

self.tableview.headerView = yourViewWithImageAndTextField;

2. Just try to use Apple's own ABPersonViewController

  1. Apple's sample
  2. Documentation

Good luck to you

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