Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if([viewB superview]!=nil)
- NSLog(@"visible");
- else
- NSLog(@"not visible");
- if([self.childView isDescendantOfView:self.parentView])
- {
- // The childView is contained in the parentView.
- }
- // useful debugging method - send it a view and it will log all subviews
- // can be called from the debugger
- - (void) viewAllSubviews:(UIView *) topView Indent:(NSString *) indent {
- for (UIView * theView in [topView subviews]){
- NSLog(@"%@%@", indent, theView);
- if ([theView subviews] != nil)
- [self viewAllSubviews:theView Indent: [NSString stringWithFormat:@"%@ ",indent]];
- }
- }
- if viewB.superview != nil{
- print("visible")
- }
- else{
- print("not visible")
- }
- if selfView.isDescendant(of: self.parentView) {
- print("visible")
- }
- else{
- print("not visible")
- }
Add Comment
Please, Sign In to add comment