デザインがなかなかいい。 tciuro/NoticeView シートの背景は画像が用意されていてそれを使っているようだ。@2xファイルが見当たらないのが気になった。 ネタ元はこちら。 iOSで上部にかっこよく通知を出す tciuro / NoticeView が...
UINavigationControllerクラスを使用して画面遷移を行います。 まずは新規プロジェクトで「Application」→「View-basedApplication」を選択しプロジェクト名を設定します。 今回は「My」というプロジェクト名を設定しました。 そして下記コードを入力 MyAppDelegate.h @interface MyAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; MyViewController *viewController; UINavigationController *naviController; } MyAppDelegate.m - (BOOL)application:(UIApplication *)application didFinishLaunchi
I am showing a modal view which is a UITableViewController class. For some reason it won't show the navigation bar when I show it. Here is my code: SettingsCreateAccount *detailViewController = [[SettingsCreateAccount alloc] initWithStyle:UITableViewStyleGrouped]; detailViewController.modalTransitionStyle = UIModalTransitionStyleCoverVertical; detailViewController.navigationController.navigationBa
UINavigationBarをUINavigationControllerではなく、UIViewController等に独自に実装する場合、以下のようにします。 // ナビゲーションバーを生成 UINavigationBar* navBarTop = [[UINavigationBar alloc] initWithFrame:CGRectMake(0, 0, 320, 40)]; navBarTop.alpha = 0.7f; // ナビゲーションアイテムを生成 UINavigationItem* title = [[UINavigationItem alloc] initWithTitle:@"Title"]; // 戻るボタンを生成 UIBarButtonItem* btnItemBack = [[UIBarButtonItem alloc] initWithTitle:@"Bac
2011年3月6日日曜日 【Cocoaプログラミング】UINavigationControllerの使い方 作りたかったのはナビゲーションバーを使ったこのようなアプリでした。 1枚目: アプリ起動後に表示される、最初のビュー。 ここにはナビゲーションバーを見せない。 2枚目: 次のビューを表示する、のボタンを押した後に表示されるビュー。 ナビゲーションバーが付く。 ナビゲーションバーの左側に、最初のビューに戻るためのボタンが表示される。 ナビゲーションバーの下にテーブルビューがあり、いくつかの項目が表示される。 3枚目: 項目を押すと、ビューが切り替わり、次の項目が表示される。 前のビューへ戻るためのボタン、ナビゲーションバーの”Back”が表示される。 4枚目: 最終的には、次のビューに進めない、行き止まりのビューに行き着く。 2枚目以降で、ナビゲーションバー
UINavigationControllerクラスは、階層的な画面遷移を管理するクラスです。 下右図のようにUINavigationControllerの下にルート画面があり、その下にサブ画面がぶら下がっているイメージです。 UINavigationControllerのクラス階層 生成 // 生成 UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:ルート画面]; // 自身を管理しているUINavigationControllerを取得 self.navigationController; ※階層的な画面遷移の一番元となるルート画面(UIViewControllerのサブクラス)の指定は必須です。 UINavigationControllerのプロパティ 【UI
UIBarButtonItemは、ツールバーやナビゲーションバーなどに表示するボタンを管理するクラスです。 自作することも出来ますし、システムで用意されたボタンから選んで使うことも出来ます。 UIBarButtonItemのクラス階層 生成 // タイトルとボタンのスタイルを指定した生成例 UIBarButtonItem *btn = [[UIBarButtonItem alloc] initWithTitle:@"ぼたん" // ボタンタイトル名を指定 style:<UIBarButtonItemStyleスタイル> // スタイルを指定(※下記表参照) target:self // デリゲートのターゲットを指定 action:@selector(hoge) // ボタンが押されたときに呼ばれるメソッドを指定 ]; // システムで用意されている画像を使った生成例 UIBarButton
内容の保証はできません。 /System/Library/frameWorks/UIKit.framework クラス UINavigationController † NSObject | +--UIResponder | +--UIViewController | +--UINavigationController ↑ 概要 † UINavigationControllerクラスは、オブジェクトの階層を掘り下げて全ての外観を管理するナビゲーションバーのための特殊なコントローラです。アプリケーションに提供されたビューコントローラを使用して、ナビゲーションバーの設定やビューを描画することが可能です。各ビューコントローラは、ナビゲーションバーの左・中央・右に設置することの出来るナビゲーションアイテムを持っています。 ナビゲーションコントローラはナビゲーションバーが管理するナビゲ
ブログ移行しました。 新しいブログでのこの記事は ModalViewにNavigationControllerを追加する方法 こちらです。 シンタックスカラーなど導入しているのでソースコードが見やすくなっているはずなので是非っ。 通常のモーダルは ModalView* dialog = [[[ModalView alloc] init] autorelease]; dialog.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [self presentModalViewController:dialog animated:YES]; でモーダルに推移する。 このモーダルにナビゲーションバーを追加表示する。 方法は超簡単。 ModalView* dialog = [[[ModalView alloc] init] aut
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く