I added a bunch of UILabel to the UITableViewCell contentView , some of which may overlap. When I click on any of the shortcuts, I want to trigger some actions. In addition, I want to raise the label with the inscription up.
Using UITapGestureRecognizer on shortcuts, I can figure out which one is involved and perform actions. But casting a shortcut with overlap and overlap to the fore does not work. This is what I am trying:
UILabel *foundLabel = ....; // find the label for (UITableViewCell *acell in theTable.visibleCells) { UIView *cellContentView = acell.contentView; if ([cellContentView.subviews containsObject:foundLabel]) { [cellContentView bringSubviewToFront:foundLabel]; NSLog(@"should bring to front..."); } }
I get the NSLog output above, so I know that bringSubviewToFront is called in the corresponding contentView cell. But no changes to the layout of the subview.
Ideas?
source share