Arpit Parekh Arpit Parekh - 1 year ago 64
iOS Question

How to distinguish 3 objects in a custom cells

I am making an iPhone app.

In this application I have to make a look like below.
I am not allowed to use collection view.

Table View with Custom cell

I am using tableview, and custom cells. Which I am easily able to incorporate. Means taking 3 subviews in Custom cells. And making a look.

Here the problem is In a cell, how do I distinguish each object. so that I can call each object, to set an image on image view.

Is there any Object oriented mechanism to distinguish all 3 objects in a cell ?

Answer Source

Try to get the data as NSArray of NSDictionary containing an array of 3 objects that you want to display on cell.

Assign tag to UImageView in the custom cell.

In cellForRowAtIndexPath, get the 3 objects and apply image using switch case.

Well everything depends on how you get the data from the server

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download