Can any one guide me in implementing this UI Design for a UITableView. I have a table view with different colored cells with some labels within each cell.
When the user scrolls the table view the label on the colored cell should go back to the bottom bar which is placed at the bottom of the screen with two lines, but the bottom bar background color should change to be the same as the selected cell color.
i think the attached image will give you clear idea how it should be
I hope result which I get from my code is the one which you are expecting.
Result looks like as shown below.
If the result is the expected one, please follow the steps noted down:-
STEP 1: Setting up the UIView.
I have used storyboard approach to design this app. Add a UIView at the top and as well at the bottom. Between them add a UITableView.
This will result in the following UIView. Since I am using a storyboard approach I can add a my custom cell directly to a UITableView.
Note: You will need to set the "Identifier" for the cell to be reused in your code. For this please go to attribute Inspector , and set a String to "Identifier" field. lets say identifier is "CellID", which you will be using in the code.
Once the UIView is setup, please make a IBOutlet to the bottomView and mark the delegate,datasource of UITableView to the ViewController.
STEP 2 Coding
I have used NSArray of UIColor objects, one array for selected Background colour and other for normal background colour of the cell.
Table Methods