Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /home/users/1/juny/web/hidef/wp-content/plugins/ultimate-google-analytics/ultimate_ga.php on line 524

Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /home/users/1/juny/web/hidef/wp-content/plugins/ultimate-google-analytics/ultimate_ga.php on line 524

TabBarControllerとNavigationControllerのボタン追加

公開日: : 最終更新日:2014/08/01 iPhone App 開発, Objective-C


Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /home/users/1/juny/web/hidef/wp-content/plugins/ultimate-google-analytics/ultimate_ga.php on line 524

TabBarとNavigationを同時に使っているViewControllerの場合、navigationItemにボタンを追加しようとしても反映されない。

散々悩んだ挙げ句、TabBarController側のnavigationItemに設定することで解決しました。

UIBarButtonItem *addItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(insertNewObject:)];
self.tabBarController.navigationItem.rightBarButtonItem = addItem;

こんな感じでOKっぽいです。

ad

関連記事

[iPhone App] WorkManagerの不具合について

バージョン1.2.2の不具合 11/25日現在、iPhoneアプリの「WorkManger」バージ

記事を読む

[Objective-C] no architectures to compile for … のコンパイルエラーについて

起動したプロジェクトでコンパイルエラーが出ました。 no architectures to com

記事を読む

[Swift] UINavigationControllerで戻るイベントを取得する

UINavigationController UINavigationControllerを使用し

記事を読む

iPhoneApp WorkManager公開されました!

きっとリジェクトされるんだろうなと思いながら申請を出して1週間。 本日、公開のメールが届きまし

記事を読む

[Objective-C] 小数点を丸める!(数値変換)

小数点を含む数値 Objective-Cに限らず、小数点を含む数値を計算する場合はdoubleやf

記事を読む

[Swift] プロパティリスト(plist)の値を取得

plistからデータを取得してみます。 こちらのエントリーも参考にしてみてください。 プロパテ

記事を読む

[Swift] プロパティリスト(plist)を使ってCoreDataで一括登録する

プロパティリストを使う 初期データやあらかじめ用意したデータを一括登録したい場合、プロパティリスト

記事を読む

[Swift] スクリーンサイズを取得する

スクリーンサイズを取得 iPhoneの幅と高さを取得する関数を紹介します。 iOS8から画面の傾

記事を読む

no image

爆走中!

挫折街道爆走中です! が! 迷走中でもあるわけです、はい。 そんな中で、迷走するに至った訳

記事を読む

[Objective-C] UINavigationControllerのセグエを使って画面遷移をする

画面遷移の実装 今回はUINavigationControllerを使って画面遷移をしたいと思いま

記事を読む

ad

Message

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

ad

[PHP] curl転送してみる(googleに)

curlでgoogle画像検索APIにアクセスしてみます。 cu

[PHP] PDOでMySQLの接続確認をする

PDO PHPでMySQLに接続する際には、mysql_connec

[PHP] ランダムな英数字を生成する

便利系メソッド 今回はPHPでランダムな英数字を作成してみます。

[Swift] プロパティリスト(plist)の値を取得

plistからデータを取得してみます。 こちらのエントリーも参考にし

[Swift] Asset Catalogについて

XCode5から追加されたAsset Catalog。 いままで標準

→もっと見る

  • 1978年の七夕生まれ。 25才でweb業界の門を叩き、28才でフリーランスに。 現在は、フリーランスでマークアップ中心に、wordpressのカスタマイズやデザインをしております。 また、iPhoneアプリの開発もしております。

Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /home/users/1/juny/web/hidef/wp-content/plugins/ultimate-google-analytics/ultimate_ga.php on line 524
PAGE TOP ↑

Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /home/users/1/juny/web/hidef/wp-content/plugins/ultimate-google-analytics/ultimate_ga.php on line 524