UITableView Margined/In Header - iphone

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?

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

Labels and images above TableView don't show up on device

So, I've laid out a UITableViewController with two prototype cells, and a view in the TableView's header area. In the header area, there are two views that each hold an icon and a label, Friends and Groups.
It looks all good in the Storyboard Editor, but when the screen actually loads, the images and labels in question are gone. I'm fairly new to iOS, so I haven't run into this before. Here are a couple screen shots to illustrate:
In the storyboard editor:
On the simulator:
Any thoughts? Thanks in advance for your help.
You've implemented the data source methods in your view controller, correct?
If not, UITableView will call a method that its data source implements: tableView:cellForRowAtIndexPath: from the UITableViewDataSource protocol, where you would return the cell to use, in this case the cell with the Identifier that you specified in your Storyboard.
We figured out that this was because the tableHeaderView of a UITableView is really weird about updating/redrawing. It's very difficult to get it to act in any sort of expected behavior.
Instead of using UIImageViews, we used UIButtons. The buttons seem to know how and when to updated and redraw themselves, so that worked.

iPhone Recent Calls Details View - Custom Cell?

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.

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.