我有点卡在这个上,我有一个UIButton
内部 a UIViewController
,但由于某种原因UIButton
没有响应。
_downloadButton = [[DownloadButtonViewController alloc] init];
_downloadButton.issue = _issue;
_downloadButton.view.frame = CGRectMake(self.descriptionLabel.frame.origin.x, self.descriptionLabel.frame.origin.y + self.descriptionLabel.frame.size.height + 20, 200, 27);
[self.view addSubview:_downloadButton.view];
UIButton *tmpButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
tmpButton.titleLabel.text = @"test";
tmpButton.frame = CGRectMake(_downloadButton.view.frame.origin.x, _downloadButton.view.frame.origin.y - 30, _downloadButton.view.frame.size.width, _downloadButton.view.frame.size.height);
[self.view addSubview:tmpButton];
为了查看是否没有任何东西与它重叠,我添加了UIButton
一个稍微低一点的东西,即使我将它添加到相同的位置它仍然有效。
我的应用程序的结构是这样的
- UIViewController
- UIScrollView
- ThumbCover
- UIImageView
- DownloadButton --> NOT WORKING
- UIButton --> WORKING
- UILabel
- ThumbCover
- UIImageView
- DownloadButton --> NOT WORKING
- UIButton --> WORKING
- UILabel
- ThumbCover
- UIImageView
- DownloadButton --> NOT WORKING
- UIButton --> WORKING
- UILabel
- ThumbCover
- UIImageView
- DownloadButton --> NOT WORKING
- UIButton --> WORKING
- UILabel
这DownloadButton
只是一个简单的UIButton
,没有什么特别的。