在我正在開發的應用程序中,我顯示了一個UIAlertView
。使用NSTimer
我刪除了調用方法removeFromSuperView
的警報。該警報已被刪除,但隨後任何控件都可以在當前視圖上運行。任何人都可以幫助我如何解決它?這裏是我的代碼顯示警報:如何從主視圖中刪除UIAlertview
UIAlertView *alert=[UIAlertView alloc]initWithTitle:@"A" message:@"B" delegate:self cancelButtonTitle:nil otherButtonTitles:nil, nil];
[alert show];
[alert release];
[NSTimer scheduledTimerWithTimeInterval:4.0 target:self selector:@selector(removeAlert:) userInfo:nil repeats:NO];
而該定時器調用的方法:
-(void)removeAlert:(id)sender
{
[alert_View removeFromSuperview];
}
你可以發佈一些代碼我的朋友創建您的警報即時全球性的? – NiravPatel
sdk:軟件開發工具包。我不認爲這就是你在這裏的意思。請明確問題。你可以使用編輯選項來修改問題 –
顯示一些代碼。 – Dilip