我是 IOS 开发的新手。我有一个带有“创建”和“取消”两个按钮的 View ,但它们没有突出显示。它们出现在允许长按复制/粘贴/粘贴的 pdf 之上)。实际上“创建”高光真的很快,但是取消根本不会改变状态。知道是什么原因造成的。
-(IBAction)create:(id)sender{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Name your object" message:@"" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Save",nil];
alert.alertViewStyle = UIAlertViewStylePlainTextInput;
[alert show];
}
-(IBAction)cancel:(id)sender{
[self.view removeFromSuperview];
[[NSNotificationCenter defaultCenter] postNotificationName:kExitAnnotationView object:nil ];
}
最佳答案
如果您“创建”操作映射到 TouchDown 上,您将看不到按钮的突出显示状态
关于objective-c - 触摸时按钮不突出显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13901992/