Design suggestion required in UITableView Swift - 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.

Related

A custom headerView like iPhone contacts image and small UITableViewCell

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?

UIScrollView with a UITableView mechanism

I am looking for a third party library that would allow me to use a UIScrollView with a UITableView mechanism, so it will have something like viewForRowAtIndexPath, numberOfRowsAtIndexPath.. reusing views. I know a UITableView is a subclass of UIScrollView, but I want to do more customization that will be kind of hard when using UITableView.
Since UITableViewCell is a subclass of UIView, you could use a custom UITableViewCell, adding your view as the UITableViewCell's subview. I am assuming that all your views are of the same size. (In the table view controller's init method, remember to set self.tableView.rowHeight to a value that will accommodate the heights of your views.)
See the Customizing Cells section of Apple's Table View Programming Guide for iOS for more info.

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.

How To Replicate This User Interface Design?

I want to create a UI like the on in Mint.com app. Is it a UIScrollView with UITableView cells in it?
Notice how each block/cell has multiple data values in it.
This is all about customising the table view and table view cells. The best tutorial I've found is Cocoa with Love: Easy custom UITableView drawing. It's a good place to start.
This is a UITableView with UITableViewStyleGrouped and multiple sections. The spacing between sections appears to be increased from the default value.
The cell backgrounds have a slight gradient added to give them depth. Each section appears to have a different custom layout of labels, and, in the one case, a custom slider-like object. The object on the right is a standard UITableViewCellAccessoryDetailDisclosureButton.
You can achieve similar effects by subclassing UITableViewCell.

Multiple Cell Images

Can you place more than one image in a UITableViewCell?
Yes.
You can have 2 images per cell, without customizing.
imageView
accessoryView
You can also add images to the contentView.
The standard UITableViewCell only supports one image (via the imageView.image property).
However, you can make a custom subclass of UITableViewCell and add the desired number of image views.
The simplest way would be to set a custom view (with any number of images) as the cell's contentView.
You could create a custom view and set it as the cell's contentView property. AppleĀ“s Table View Programming Guide for iPhone OS explains in good detail possible strategies for customization of an UITableViewCell.