A custom headerView like iPhone contacts image and small UITableViewCell - iphone

I am trying to get an application that has UITableview with a custom header view. I want the header view to be quite similar to the iPhone contacts app (see picture) when you are editing/adding a new contact i.e. a small image to the left and 2 to 3 static text entry cells on the right that look like the UITableView Grouped cells.
Whats the easiest way to achieve this design in IB or Code (without Story board)? At the moment it seems like I have to create a Parent UIView, add an image on the left and add a UITableView on the right and populate it with UITableViewCell dynamically. But this seems cumbersome and means I have to implement another class with a UITableView delegate protocol to populate the UITableview cells in the header.
Is there an easier way to do this?

Related

Design suggestion required in UITableView Swift

I just need a suggestion to Implement tableView for the application.
According to reference image is this a collectionView used in tableView?
Actually I want to implement 4 views on the top of the tableView something like Reminder app of apple. Obviously not to copy design but I need 4 views within UITableView.
These 4 views are also scrollable as its the part of tableview.
I am confused in this how can I achieve this design image attached.
my main concern is 4 top views tile style.
Image
In your case you may better use tableHeaderView property of UITableView and set your "reminder" view as tableHeaderView:
self.tableView.tableHeaderView = myReminderView
If you need to implement it as a cell, for some reasons, just create a custom UITableViewCell subclass and add UICollectionView with all DataSources/Delegates implementations you need inside this cell class.

Multiple images on a custom table view cell (Swift)

I'm trying to think of how to best solve this...currently my app supports a user uploading and saving an image to Parse and then retrieving it to a UIImageView on a custom table view cell. However, how would I go about implementing multiple pictures where a user swipes the top picture and the next photo is shown, all in the same table cell? Does this require a new view? If so, how do I do this?
Thanks!
Follow that tutorial that Caleb recommended but you could also use a gesture recognizer on your custom cell. You can design the cell in the storyboard, make a subclass from UITableViewCell and connect the components via outlets to your custom class.

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.

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.

Multiple images per row in UITableView's cell

Is there any sample code that would illustrate how to have multiple images within each row?
Typical apps show a thumbnail to the left side with text to the right. I'd like to do that plus an image to the right of the text.
How would I go about doing this?
In interface builder, simply create a tableview cell that looks like you want. Then create a UITableViewCell subclass that has properties pointing to the elements of the new cell. Set the class of cell to the subclass then add cells of that class to the table in the standard way.
A tableview cell is just a view and you modify it and use it just like any other view.
You'll have to create a custom UITableView cell. Here's an example of using multiple UILabels in one. Here's another.
Pretty easy - follow Apple's documentation to create exactly the cell you want in Interface Builder with as many UIImage or whatever else you like. Look at Table View Programming Guide for details on how to make and load the custom cells - just be careful about performance when you put a lot of visual elements in a table view.