Exclude subviews from UIGestureRecognizer

I used the simple way below. It works perpectly! Implement UIGestureRecognizerDelegate function, accept only touchs on superview, not accept touchs on subviews: – (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { if (touch.view != _mySuperView) { // accept only touchs on superview, not accept touchs on subviews return NO; } return YES; }

how to get access subview of UIView?

You can use view’s tag property: UIImageView *imageView1 = [[[UIImageView alloc] init] autorelease]; imageView1.tag = 100; UIImageView *imageView2 = [[[UIImageView alloc] init] autorelease]; imageView2.tag = 200; imageView2.alpha = 0; [cell.accessoryView addSubview:imageView1]; [cell.accessoryView addSubview:imageView2]; And later get subview using -viewWithTag: method: UIImageView *getImageView1 = (UIImageView*)[cell.accessoryView viewWithTag:100];

iPhone Programming: Applying Alpha to Parent but not to Child Views

One simpler way is also possible without making the views siblings. Don’t set the alpha directly on the parent view. Instead use [parentView setBackgroundColor:[[UIColor clearColor] colorWithAlphaComponent:0.5]]; Now any child view can have its own color and will NOT be transparent. In Swift, this would be parentView.backgroundColor = UIColor.clearColor().colorWithAlphaComponent(0.7)

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)