我试图将覆盖图像放在整个 iPhone 屏幕上(也在导航和标签栏上),但没有任何反应。viewDidLoad
self.imageView = [[UIImageView alloc]
initWithImage:[UIImage imageNamed:@"overlayimage.png"]];
UIWindow* window = [[UIApplication sharedApplication] keyWindow];
[window.rootViewController.view addSubview: imageView];
UITapGestureRecognizer * recognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
recognizer.delegate = self;
[imageView addGestureRecognizer:recognizer];
imageView.userInteractionEnabled = YES;
self.imageView = imageView;
这是我想要得到的结果: