iPhone Recent Calls Details View - Custom Cell? - iphone

I would like to have something that would kind of replicate the details view of the recent calls tab on the iPhone phone.app.
When viewing the recent calls, tapping the disclosure button takes me to the view pictured here: http://img337.imageshack.us/img337/3456/recentcalls.jpg
I would like to know if that area in blue represents a custom cell. Am I right? Or is there an easier way to accomplish this?
My need for replicating this comes from my trouble with heightForRowAtIndexPath, as explained here: heightForRowAtIndexPath for only one section?
(I won't be using heightForRowAtIndexPath anymore with this solution).
Thanks in advance.

It looks like the area you've outlined in blue is the section header for the first section. You could also just use the table header.
Matt Gallagher posted a nice article on customizing your table header.

If I had to guess, it is likely a custom section header view, glued together from various labels and other widgets.
It would certainly seem much, much easier IMO to do this with a custom table view header view than with a custom table view cell.
See the table view delegate method -tableView:viewForHeaderInSection: where you return your custom UIView object for a given section.

Related

UITableView Margined/In Header

I'm looking to create the TableView section contained in the header of this tableview (the "margined" area with Eric Mulder typed in). Does anybody have any insight on this matter? Thanks!
You can't do it easily with a delegate method of UITableView. I got it to work by creating an image which contains a the style of the default cells of a table view. Then I simply load it as an UIImageView in my header view of the table view.
For example, you can take a look at my app iCookit (App Store). You can see the work on the 3rd picture. That's the result. It was very easy to do. Just a little bit with Photoshop or Gimp.
Have you tried setting a UIView that contains both the photo well and a UITableView for the name fields as the main UITableView's headerView?

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!

Left area of section in iPhone TableView

I have a section where I would like to customize the left area of a section a TableView - a bit like viewForHeaderInSection.
I have thought at using a cell for the section instead, but it would be a lot of nitty-gritty.
If I understand your question correctly, you want to customise the left-hand-side of some, or every cell in a UITableView? Then you need to make create your own custom table view cells. I normally make these cells in Interface Builder; this post helped me out. See also the Customizing Cells section of Apple's Table View Programming Guide for iOS.
I read your question to mean that there is one custom element to the left of a bunch of cells. The only way I know of offhand is to use a cell as you describe and then have a left view and a tableview inside of it.

sticky selected cell in UITableView like the new twitter ipad app?

any idea how to have the selected cell in UITableView sticky and remain visible while scrolling? like how the twitter ipad app works. i would like it on my splitview's uitableview.
You are probably using a UITableViewController right? This automatically deselects a selected row. To avoid this, the best option would be to use a normal UIViewController with the protocols UITableViewDelegate and UITableViewDataSource.
Building from a comment Vince made on my previous answer (since deleted since it was more of an explanation of how long and how much effort a feature like this would take rather than an attempt at answering the question).
You could store the index path of a cell when it becomes selected, and then as the cell is about to scroll offscreen (you'll need some trickery to detect this) you could retrieve the cell view returned from cellForRowAtIndexPath and set a section header view to use this cell view.
This would be a pretty monstrous hack though, and you'd need to find a way to elegantly split the table into sections in order to use the section header.
I wouldn't recommend this approach, although its a step in the right direction.

iPhone app - some custom UITableViewCell questions

At the moment, I have a settings view in my iPhone app built with Interface builder, it consists of a background image, some text fields, labels and buttons. Because this looks bad, I want to convert the settings view to an UITableView with custom UITableViewCells.
I already tried adding some cells into my settings view's XIB and returning them in the cellForRowAtIndexPath method (with [return myCell];), as written in Apple's tutorial, but this was not working for me - my whole TableView looked strange and it only showed the first cell correctly.
Is it possible to design these custom cells in Interface Builder? Do I have to create an empty XIB for them or can I put them in my view's XIB? And how do I insert them into my TableView?
Thanks in advance,
Yassin
You can absolutely add custom table cells that you built in interface builder. This includes both static cells and Dynamic cells. However without you providing more information the best I can say is "double check the docs and try again." I can only say that it works and it's rather straightforward so it's hard to say what you may have missed. It might be more helpful if you post what you have for the tableView:cellForRowAtIndexPath method.
Since you say you just have some text fields, I would recommend looking at the technique for static row content section of the Table View Programming guide. You probably would want to have each field of your form correspond to a row in a Segmented Table View, it'll make everything look nicer.