Search code examples
iphoneuiimageviewnavigationuitouch

Will apple reject the app if we navigate a page on click of UIImageView


I have used 4 images and use touches began method to detect user's touch on particular image. I navigate to 4 different views based on location of touch. Will apple approve his kind of design.

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
    CGPoint touchLocation = [touch locationInView:self.view];
    CGRect rectLocation1 = CGRectMake(20, 399, 72, 61);
    CGRect rectLocation2 = CGRectMake(91, 399, 72, 61);

    if (CGRectContainsPoint(rectLocation1, touchLocation)) {
    //navigation
    }

    if (CGRectContainsPoint(rectLocation2, touchLocation)) {
    //Navigation
    }
}

Solution

  • Certainly not, there's nothing wrong with this. What particular part makes you think it might be rejected? Perhaps we can help explain why it's not a problem.

    The full set of guidelines is posted here. (Apple Developer login is required)