• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

UITabBarController の中で UINavigationController を使っていて、その中で pushViewController で遷移している時に、それ自身の Tab をタップすると、navigationController が rootViewController に戻ってしまう。
これを避けるには UITabBarController の delegate をつなぎ、その delegate の中で以下のように自分自身かどうかを判断して YES/NO を返すようにする。

11/22 加筆
moreNavigationController がある場合、more のタブを2回タップすると、selectedIndexが NSNotFound になってくる。その対処を加えた。

ruby>>
- (BOOL)
tabBarController:(UITabBarController*)pTBC
shouldSelectViewController:(UIViewController*)p {
return pTBC.selectedIndex < pTBC.viewControllers.count
? [ pTBC.viewControllers objectAtIndex:pTBC.selectedIndex ] != p
: YES
;
}
<<--

posted by Saturn Saturn on Wed 17 Nov 2010 at 06:37 with 0 comments
Contents rssrss
Value Transformer
AES & Blowfish in swift (CBC)
OreOre.pem の作り方
JSON Chat Server Skelton in GoLang TLS Ver.
JSON Chat Server Skelton in GoLang
UITextView と、UITextField でキーボードが出た時の Notification の順番が違う
Making window which covers iPhone's Status Bar
UIImagePickerController の編集領域
UIView の tag property
UILocationManager
Services from s21g
MagicBag
MagicBagは、Cloudflare R2やS3互換ストレージをMacのFinderから扱えるファイル同期クライアントです。
アンテナショップめぐり
東京にある全国のアンテナショップ、イベント、特産品を地図や条件から探せるサービスです。
YOMU Web小説リーダー
YOMUは、Web小説の読み上げに特化したiPhoneアプリです。
補助探
公開されている補助金・助成金情報を集約し、条件に合う制度を探しやすくするサービスです。
jotter.me
jotter.meは、考えやアイデア、情報を書き留めるためのノートサービスです。