iOS Question Change tableview press color

Pooya1

Active Member
Licensed User
How do i can change color for when i press on each item in tableview?
Default color is gray for tableview
 

Pooya1

Active Member
Licensed User
There is no simple way to change the selection color. However unless you are showing a very large list then you can switch to xCustomListView and it will give you full control over the appearance.
Excuse me
I found topic about change tableview selected color from https://www.natashatherobot.com/custom-uitableviewcell-selection-style-color/
B4X:
-(void)Changecolor: (UITableViewCell*)cell {
{
    UIView *customColorView = [[UIView alloc] init];
    customColorView.backgroundColor = [UIColor colorWithRed:180/255.0
                                                      green:138/255.0
                                                       blue:171/255.0
                                                      alpha:0.5];
    cell.selectedBackgroundView =  customColorView;
}
Do you can use it in Inline code?
Sorry for my topic
 
Upvote 0
Top