我有一个信息按钮,显示为未链接到所需视图控制器的相机视图顶部的覆盖 UIView。当它被触摸时没有任何反应。
这是创建按钮并链接它的代码
// Create a Button to get Help
infoButton = [UIButton buttonWithType:UIButtonTypeInfoLight ] ;
CGRect buttonRect = infoButton.frame;
// Calculate the bottom right corner
buttonRect.origin.x = 455;
buttonRect.origin.y = 297;
[infoButton setFrame:buttonRect];
[infoButton addTarget:self action:@selector(presentInfo) forControlEvents:UIControlEventTouchUpInside];
[view addSubview:infoButton];
这是创建segue的代码
- (void) presentInfo
{
InfoViewController *ivc = [self.storyboard instantiateViewControllerWithIdentifier:@"InfoViewController"];
[self presentModalViewController:ivc animated:YES];
}