14

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 !

Pierre
  • 10,593
  • 5
  • 50
  • 80

7 Answers7

3

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.

MCannon
  • 4,011
  • 2
  • 16
  • 12
  • This worked for me. I might I add that the HeaderFooter sample code by Apple was helpful too. – Ali Jun 18 '13 at 15:51
2

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];
Jake Dahl
  • 171
  • 2
  • 3
  • 13
1

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

rschrader
  • 11
  • 1
1

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.

Rui Nunes
  • 798
  • 1
  • 8
  • 15
0

check out these links.. they are about customizing uitableviews and are rather detailed.

http://www.e-string.com/content/custom-uitableviewcells-interface-builder

http://www.galloway.me.uk/tutorials/custom-uitableviewcell/

mattjgalloway
  • 34,792
  • 12
  • 100
  • 110
0

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

visakh7
  • 26,380
  • 8
  • 55
  • 69
-1

No need to create your own table view. The address book framework creates absolutely all of this and will even add contacts to the iPhone's address book too.

NonatomicRetain
  • 301
  • 4
  • 14