I am trying to do an instruction overlay

| | August 6, 2015

This is what i put in my appdelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{
    UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"image.png"]];
    [self.window addSubview:imageView];
    UITapGestureRecognizer * recognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
    recognizer.delegate = self;
    [imageView addGestureRecognizer:recognizer];
    imageView.userInteractionEnabled = YES;
    self.imageView = imageView;
    return YES;
}

- (void) handleTap:(UITapGestureRecognizer *)recognize 
{
    [self.imageView removeFromSuperView]; //ERROR * No visible @interface for 'UIImageView' declares the selector 'removeFromSuperView'
}

Leave a Reply