【发布时间】:2015-10-23 08:27:45
【问题描述】:
UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapGestureAction)];
tapGestureRecognizer.numberOfTapsRequired = 1;
self.fullScreenImageView = [[UIImageView alloc]initWithFrame:self.frame];
self.fullScreenImageView.image = [UIImage imageNamed:@"family"];
self.fullScreenImageView.userInteractionEnabled = YES;
[self addSubview:self.fullScreenImageView];
[self.fullScreenImageView addSubview:tapGestureRecognizer];
这些代码有什么问题。
Xcode 7.0 给出了这个错误:
不兼容的指针类型发送“UITapGestureRecognizer *”到 'UIView * _Nonnull' 类型的参数
【问题讨论】:
标签: ios objective-c iphone xcode7