u16suzuの blog

日々学んだことのメモブログです。

UIAlertView

BlocksKit を使うとデリゲート書かなくて済む. 読みやすい. アラート出すだけなのにデリゲート書く必要があるのはやっぱり大げさだなぁ.

    UIAlertView *al = [UIAlertView alertViewWithTitle:@"OK?"];
    [al addButtonWithTitle:@"OK" handler:^{
        [self.navigationController popViewControllerAnimated:YES];
    }];
    [al addButtonWithTitle:@"Cancel"];
    [al show];