iOS(iPhone,iPod,iPad)アプリの開発に関する小ネタ集です。徳島大学でアプリ開発を行っているmake.appが運営しています。make.app公式サイト http://app.ias.tokushima-u.ac.jp/

このエラーの落ちる場所

    UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"キャンセル" destructiveButtonTitle:nil otherButtonTitles:@"ツイート",@"あいさつ", nil];
    [sheet showInView:self.view.window];// ここで落ちる

これはUITabBar使用してるので self.view.windowでいいはずなのに…

    UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"キャンセル" destructiveButtonTitle:nil otherButtonTitles:@"ツイート",@"あいさつ", nil];
    [sheet showInView:self.view];

にしたらうまく行きました。
理由がよくわからないのでわかる方は教えてください。

参考URL


*追記

全然違いました。
下記が参考になります。
TabBarController+NavigationControllerな構成でUIActionSheetがおかしい件の対策

コメントをかく


「http://」を含む投稿は禁止されています。

利用規約をご確認のうえご記入下さい

メンバーのみ編集できます