I hope the result that I get from my code is the one you expect.
The result is as shown below.

If the result is expected, follow these steps: -
1: UIView.
. UIView , . UITableView.
UIView. , UITableView.
. "" . Inspector String "". , "CellID", .
UIView , IBOutlet bottomView , UITableView ViewController.

2
NSArray UIColor, .
- (void)viewDidLoad
{
[super viewDidLoad];
colors=[NSArray arrayWithObjects:[UIColor colorWithRed:1.0 green:0.0 blue:0.0 alpha:0.2],
[UIColor colorWithRed:0.0 green:1.0 blue:0.0 alpha:0.2 ],
[UIColor colorWithRed:0.0 green:0.0 blue:1.0 alpha:0.2 ],[UIColor colorWithRed:1.0 green:1.0 blue:0.0 alpha:0.2], nil];
selectionColors=[NSArray arrayWithObjects:[UIColor colorWithRed:1.0 green:0.0 blue:0.0 alpha:1.0],
[UIColor colorWithRed:0.0 green:1.0 blue:0.0 alpha:1.0 ],
[UIColor colorWithRed:0.0 green:0.0 blue:1.0 alpha:1.0 ],[UIColor colorWithRed:1.0 green:1.0 blue:0.0 alpha:1.0], nil];
}
-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView{
return 12;
}
-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return 1;
}
-(void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
cell.backgroundColor=[colors objectAtIndex:(indexPath.section%4)];
UIView *selectedBackgroudView=[[UIView alloc] init];
[selectedBackgroudView setBackgroundColor:[selectionColors objectAtIndex:indexPath.section%4]];
cell.selectedBackgroundView=selectedBackgroudView;
}
-(UITableViewCell*) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *cellIdentififer=@"CellID";
UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:cellIdentififer];
return cell;
}
-(CGFloat) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 10.0;
}
-(UIView*) tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
UIView *footerV=[[UIView alloc] init];
return footerV;
}
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
UITableViewCell *cell=[tableView cellForRowAtIndexPath:indexPath];
UIColor *color=cell.selectedBackgroundView.backgroundColor;;
self.bottomView.backgroundColor=color;
self.bottomView.layer.shadowColor=color.CGColor;
self.bottomView.layer.shadowOpacity=0.9;
self.bottomView.layer.shadowPath=[UIBezierPath bezierPathWithRect:CGRectMake(-10.0, -10.0, self.view.frame.size.width+20, 20)].CGPath;
}