I\'ve created a table where each cell holds both a text label and a text field. I\'m adding the textfields as such [cell addSubview:passwordField];
and from a v
Instead of UIView* subView = [[cell.contentView subviews]lastObject];
you can try to find it as:
for(UIView *view in [cell subviews])
{
if([view isKindOfClass:[UITextfield class]]){
// view is the reference to your textfield
}
}
That way you can add other UIView
s as subviews and still get the reference of the textfield without having to keep track of its subview index.