我正在尝试做这样的事情:首先,在启动时,“接受”按钮被禁用,用户必须阅读文本视图区域中的条款和条件,然后将启用接受按钮。到目前为止,这是我的代码,有人可以给我一些建议吗?
- (IBAction)acceptAction:(id)sender {
if ([self.termConditionTextView scrollsToTop] == true) {
[acceptButtonOutlet setEnabled:NO];
[[[UIAlertView alloc] initWithTitle:@"Term & Condition" message:@"Please read term & condition first. Thank you." delegate:nil cancelButtonTitle:@"Back" otherButtonTitles:nil] show];
} else {
[acceptButtonOutlet setEnabled:YES];
}
}