2013-07-12 44 views
1

這看起來很簡單,但我無法將其包裹在頭上。UIAlert郵件遞增

我有UIAlertView中INIT這裏:

- (IBAction)countClick:(id)sender { 

    NSInteger *num = 1; 
    self.alertMessage = [NSString stringWithFormat:@"%d",num]; 
    NSLog(@"%@",self.alertMessage); 
    self.countAlert = [[UIAlertView alloc]initWithTitle:@"Count" message:self.alertMessage delegate:self cancelButtonTitle:@"end" otherButtonTitles:@"+",@"-", nil]; 
    [self.countAlert show]; 
} 

當顯示該視圖它有三個按鈕的標題和消息。 我的問題是,當他們點擊+按鈕或 - 按鈕我需要消息減少或添加,然後反映出來。

我似乎無法得到這個工作,任何幫助非常感謝!

+2

你不能用'UIAlertView'來做到這一點。一旦顯示,該消息就不能更新,除非您解除當前警報並顯示另一個警報。 – rmaddy

回答

0

這不適用於UIAlertView。您必須創建自己的自定義警報來處理這種功能。