经过网上的一些研究没有成功,我来这里问你关于我的警告的问题.
实际上,我有一个带导航控制器的视图V1,我想在V1加载完成后推动模态视图V2.所以我使用的performSegueWithIdentifier方法(我使用的是故事板).这是我的代码:
[self performSegueWithIdentifier:@"showConnexionViewSegue" sender:self];
Run Code Online (Sandbox Code Playgroud)
当我编译时,我得到了这个警告:
Unbalanced calls to begin/end appearance transitions for <UINavigationController: 0x6849b30>
Run Code Online (Sandbox Code Playgroud)
谁能帮我?
我已经创建了UIView的自定义子类,因为我需要覆盖drawRect方法.我尝试添加一个UITapGestureRecognizer,但这对我不起作用.这里,我的ViewController的代码:
MyCustomView *customView = [[MyCustomView alloc] initWithFrame:CGRectFrame(0, 30, 30, 30)];
[customView setUserInteractionEnabled:YES];
UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(doSomething)];
[customView addGestureRecognizer:tapGestureRecognizer];
Run Code Online (Sandbox Code Playgroud)
我不明白为什么当我触摸我的UIView子类对象时,手势识别器不会启动.
非常感谢提前!
固定了!
我的观点是在UIImageView上,而UIImageView没有userInteractionEnabled设置为YES.
我在我的故事板中制作了一个包含几个的滚动视图UIImageView.
问题是,滚动视图的框架是等于{0, 0, 0, 0},我不知道为什么.滚动视图在我的屏幕上可见,但我无法滚动它.
我已经尝试设置内容大小和框架,但没有成功.