按钮不会突出显示

问题描述:

我是IOS开发新手。我有两个按钮“创建”和“取消”的视图,但他们没有突出显示。它们出现在允许复制/杯子/粘贴的longpress的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映射您将无法看到你按钮的聚焦状态

在你的取消方法要删除的上海华...其实你的取消按钮突出显示,但您无法看到。如果您希望看到您可以稍后使用1秒或更少延迟的计时器执行取消方法中的操作。 您可以在创建方法中做同样的事情。希望它能起作用...... :)