I have fairly started with IOS development and am on my first client project.
I am stuck at the following place:
so if there are 10 people’s birthday this month, i need to display 10 imageviews in a single row (3 pictures, 3 pictures and 1 picture).
Can someone help me with the above. It will be greatly appreciated.
If you want to add images/labels/buttons in tableview, then the simplest way is to subclass UITableViewCell.For Example if you have 5 images(didn’t understand 3 pictures, 3 pictures and 1 picture ) and you want to show them in a table row then you could do something like this:
Add a new file in your project named CustomCell which should be the subclass of UITableviewCell like this:
And in CustomCell.m put this code like this:
So you are done with subclassing of UITableViewCell.Now how to use them in your view controller?
You have to import CustomCell.h in your View Controller class.And in the cellForRowAtIndexPath delegate method do some thing like this:
u could use the better was :
this is the very prototype solution for your problem’s context.
Hope it would help you 🙂