iPhone : form like new contact

2019-02-01 01:19发布

I have some questions about the Apple iPhone Contact App. I want to use the same methode to create and modify information.

Here's two pics :

alt text http://grab.by/4ZjQ alt text http://grab.by/4ZjR

So we have the creation and the edition. The form looks like an UITableView with a groupedStyle but I don't know how to re-creat all of this. Have you got an idea or a tutorial that might explain how to do it ?

Thanks a lot !

7条回答
疯言疯语
2楼-- · 2019-02-01 01:53

the top bit is a UIView with a UIImageView and a UITableView, this view is set as the header of the overall UITableView.

As for the editing, you need to swap out the UILabel, with a UITextField, which has the same frame, and font-size. move the content from one view to another.

查看更多
手持菜刀,她持情操
3楼-- · 2019-02-01 01:55

I'm trying to develop something like this and imagining it. In my opinion, if you look closely, the screen seems to be composed of a vertical UIScrollView. This component will hold a UITableView with multiple sections or maybe even several UITableView components. When focusing textfields on cells, the UIScrollview scrolls the content to place the selected textfield in a more suitable/balanced .y position, for viewing and editing.

查看更多
贼婆χ
4楼-- · 2019-02-01 01:57

Customizing the UITableview is definitely the way to go. To make it a little simpler on yourself, you may want to check out the Sensible Tableview, which makes all of this much easier to implement: http://thenextweb.com/dd/2011/04/12/an-ios-developers-dream-sensible-tableview/?awesm=tnw.to_17mDs

查看更多
一夜七次
5楼-- · 2019-02-01 01:59

Create a UIView that is a line, then add it as a subview to the cell

//in cellForRowAtIndexPath
UIView *lineView = [[UIView alloc]initWithFrame:CGRectMake(80,0,1,44)];
lineView.backgroundColor = [UIColor lightGreyColor];
[cell addSubview:lineView];
查看更多
该账号已被封号
6楼-- · 2019-02-01 02:09

It can be accomplished by customizing table views. Use the custom cells based on the section for the table view.

查看更多
Fickle 薄情
7楼-- · 2019-02-01 02:12
登录 后发表回答