kubou.dev();

好きな言葉は一石二鳥

ボタンをタップしてアクションシートを呼ぶ

-(void)tapShopRegist
{
    UIActionSheet *as = [[UIActionSheet alloc] init];
    as.delegate = self;
    as.title = @"タイトル";
    [as addButtonWithTitle:@"選択肢1"];
    [as addButtonWithTitle:@"選択肢2"];
    [as addButtonWithTitle:@"キャンセル"];
    as.cancelButtonIndex = 2;
    as.destructiveButtonIndex = 0;
    [as showInView:self.view];
    [as release];
}

-(void)actionSheet:(UIActionSheet*)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {

    switch (buttonIndex) {
        case 0 : {
            UIViewController *controller = [[[RecentArticleListController alloc] init] autorelease];
            [self.navigationController pushViewController:controller animated:YES];
            break;
        }
        case 1 : {
            UIViewController *controller = [[[SearchShopController alloc] init] autorelease];
            [self.navigationController pushViewController:controller animated:YES];
            break;
        }
    }
}