Friday, November 9, 2012

1.How to get the subview from parent view To accès thé subview control Ex UITextview hère code






for (UIView *viewTemp in [viewContentToMoveBottom subviews]) // [self subviews]
    {
        if ([viewTemp isKindOfClass:[UITextView class]]) // which control going to check
        {
          NSLog(@"loop enter 3 ");   
            
            UITextView *txtView = (UITextView*)viewTemp;
            
            if (txtView.tag==700)
            {
                NSLog(@"loop enter1 ");
                
                txtView.layer.borderColor = [[UIColor redColor]CGColor];
                txtView.layer.borderWidth = 1.0f;
                
                
            }
            
            else
            {
                txtView.layer.borderColor = [[UIColor colorWithRed:197.0f/255.0f green:215.0f/255.0f blue:224.0f/255.0f alpha:1]CGColor];
                        txtView.layer.borderWidth = 1.0f;

            }
        }
    }

No comments:

Post a Comment