UITableView like Contact App - iphone

I try to create an UITableView similar to the Standard Contact App, when selecting a contact (i.e. grouped style). But how do I get some controls at the top or at the bottom of the cells, which scroll with the rest? In the Contact App you have at the top the picture together with the name and at the bottom three buttons. Are these just special customized Cells? Or can you have controls directly there?
Thanks for your help!
Regards
Matthias

I played with table header/footer views. You can create them in IB and assign them to
self.table.tableHeaderView = yourHeaderView;
self.table.tableFooterView = yourFooterView;
Needless to say, that you customize them as your wish.
Another option is to customize a table cell view for the section 0 if you have a grouped style table. You can add there a picture and a button, whatever you want.
In both cases all your elements will scroll with the table view.
Is that what you asked for?

When I did this functionality, I used a combination of UIViews and UITableViewCell.
As a header I inserted UIView, and it placed the UIButton (with picture) and UITableViewCell. After laying a transparent UIView and subscribe to UIControlEventTouchUpInside, which highlight the cell ([self.tableHeaderCell setHighlighted:YES];)

Related

how to create a sectioned TableView for profile in iPhone

I saw this picture on Internet:
the section with the add Photo Frame and two rows (First, Last)...
How do you achieve a design like that!!!
I only know how to make rows (static and dynamic) in xCode using the full width of the screen but not in a single section but not making such a divisiĆ³n and adding a frame out of the other two rows
my designs are like this
Any help I'll appreciate
thanks in advance
It's not really clear that the example you've given is actually embedding the first, last part into a table view. It could just as easily be a single cell that has embedded views with borders to look like rows. Here are a few ways I see to accomplish the view you've given.
Have them be actual rows - but use a custom cell layout that offsets the 'First' and 'Last' labels to be further to the right. Then create a UIImageView for the profile that sits on top of the UITableView cells, but inside of it. Basically insert it as the first subview of the UITableView. It should cover the top left of those top two cells. You can do this since those cells have a static known hight and you've set the left offset. Another option would be just inserting it into your top cell, but having it overflow the bounds and setting clipsToBounds = NO.
Make the entire top view a custom UIView that uses CALayers or CoreGraphics to manually draw the lines and layout such that it looks like part of the table view. Set that as the TableView header, or the first section Header.
There are a lot more things you can do like changing frame layout as well.
you can achieve this with the use of xib read carefully and if you don't understand anything you can ask me again it's bit tricky
in you xib create a UIView and design for your photo and firstname, lastname cells with the use of textfields image views and all and then take a UITableView.
now drag your UIView and drop it on your UITableView so that it will be considered as your table header and your first section now will be as you designed like photo with firstname and lastname fields.
i've done this in manier projects of mine so hope this way you can also do this thing and ask me if you need any help.

UIImageView and UItextView inside TableView

I'm working on iOS RSS app, and my last view, which is a UIViewController, is similar to the attached image. I inserted in my DetailView.xib, one Image View to pass the images of the RSS feeds and two Text View to pass the title and summary respectively.
The question is, how can i make the same, but inside a UITableview?
you can use custom cells for it and can add this custom cell at particular index. At first index you just add image view and at second index you just add textview.
Check out this pretty good tutorial Custom UITableViewCell Using Interface Builder.
i hope it helps you.
You can achieve this particular thing by using Custom Table View Cell.
Table View gets created using single Table View Cell again and again. It is much more efficient and uses less memory.
You should check this tutorial.
I hope it will help you.
Thanks
You can make TableView height UITableView.automaticDimension and make sure UITextView autoscroll is disabled and constraint should be leading, trailing, bottom and top.
Here's the link this might work for you:
How to make a UITextView Expand with the text like the Notes app

Custom cell in UITableView

I am making a custom cell which has text fields and as a result the custom cell is greater than the size of the iphone screen.But i am not being able to do horizontal scroll to reach the end of the cell.
I have tried using viewController and adding table view to it as well as creating table view controller and adding custom cell to it.
when doing it through TableViewController,I am not able to horizontally scroll it,whereas i am not getting how to add Custom cell class to the tableView object placed in viewController.I know that UITableView is a subclass of UIScrollView but not able to implement it.Please help.
Thanks
as per the documentation at
A table view in the UIKit framework is limited to a single column
because it is designed for a device with a small screen. UITableView
is a subclass of UIScrollView, which allows users to scroll through
the table, although UITableView allows vertical scrolling only.
so as desired in your case you will have to take some other approach. Now using Custom cell with TextFields should not actually need you to require Horizonatl scrolling. If the text is really large you would like to consider using TextView instead of TextFields.
Hope it helps
Ideally, you should be truncating your text. But if it is important for you to display the entire text, add a scroll view as a subview (or set it as the content view) and add your labels to the subview. Each cell will then be individually horizontally scrollable.

Where do I start to create a "Contact Info" page/table?

I want to create a view in my app where the user can contact me. At first glance I can see it's a grouped table view, but I'm unsure about the top part?
How do I get the Logo/Thumbnail there along side the big text and small text?
- I'm assuming it's a custom tableview cell?
Also, what about adding the buttons into a table cell? all evenly spaced apart? Would this also be through a custom table view cell? (designed in IB)
One last thing, is how would I put these two cells in with the rest?
My guess is that the green image and the three buttons on top (call, email, visit website) are all subviews of the table's header view. You can easily do that, if you go to Interface Builder and drag a UIView to the top part of your UITableView.
Then, you will need custom cells for the next part of the interface. One easy way is to make them all in IB and then create outlets and hook them to your table. Read the Table View Programming Guide for iOS regarding more alternatives for custom cells. If you need more customization, start from this excellent article. Finally, regarding the bluish rounded background of number "20", have a look at this SO question. Good luck!

Create a view like Tweetie's User Profile view

I'm just wondering if anyone has any idea on how you can create a view that looks like the user profile view in apps like Tweetie, where there are seemingly multiple tables with a couple of normal (straight up and down tables) and then two rows of six cells, which in Tweeties case have the number of followers, following etc.
I'm trying to make a similar view for my app, but can't seem to find out the best way to create it. Any tutorials, advice etc. would be appreciated.
Thanks.
P.S. Here's a picture of the view which I'm trying to recreate.
alt text http://technopedia.info/wp-content/uploads/2009/09/tweetie22.jpg
To get the same effect as Tweetie's split cell, create a custom cell and add a Segmented Control and create title and detail labels
It is a grouped tableview using custom cells. The image you show has two visible sections, and the top of a third. It also has a custom table header view. The second section has two cells built from four UILabels and a dividing line graphic in the middle. You can create this in a nib, or by hand.
You can even change the grey pin-stripe background if you want.