#author("2016-12-08T20:29:40+09:00","default:wikiwriter","wikiwriter")
#author("2016-12-08T22:07:41+09:00","default:wikiwriter","wikiwriter")
[[UIKit]]

&tag(UIKit/Tips);
*目次 [#e1c364c7]
#contents
*関連ページ [#c46ccff9]
*参考情報 [#kc632183]

*バンドル [#af6267d2]
**NSBundle vs UINib [#w6ebe36c]
-xibや各種ファイルを読み込むためのリソースハンドルとして使用する。
-NSBundleは最初から存在し、UINibはxibの読み込みを効率化するためにiOS 4以降に導入された。
-[[顕在化するmainBundleリスク - yashigani?.days:http://yashigani.hatenablog.com/entry/nsbundle-mainbundle]]にあるように、通常はmainBundleを使えば問題ないのだが、ライブラリプロジェクトを作成する場合それだとうまくいかない。以下のようにクラスを指定するのが確実。
 Bundle(for: CustomView.self)

*空データの表示 [#s0987318]
**基本 [#pf6669d7]
-空のデータをどのように表示するか。empty datasetで検索すると検索できる。
-[[Empty states - Patterns - Material design guidelines:https://material.google.com/patterns/empty-states.html#empty-states-displaying-empty-states]]…マテリアルデザインの場合。
-[[Designing For The Empty States:http://tympanus.net/codrops/2013/01/09/designing-for-the-empty-states/]]…iOSでのデザイン
-[[Empty States - Mobile Design Patterns:http://pttrns.com/?scid=30]]…サンプル
-[[1,000 件以上の 「Mobile UI | Empty Data」のおしゃれアイデアまとめ|Pinterest の画像 | アメリカの州、ユーザーインターフェース、モビール:https://jp.pinterest.com/timoa/mobile-ui-empty-data/]]
-[[UITableView: Display Message In Empty Table View | Ryan Wright:http://www.ryanwright.me/cookbook/ios/objc/uitableview/empy-table-message]]…UITableViewでの実装


*その他 [#eb806b5f]
**Tab Bar ControllerとNavigation Controllerの組み合わせ [#z1a1737b]
-[[iPhone OS View Controllerプログラミングガイド: Tab Bar ControllerとNavigation Controllerの組み合わせ:http://developer.apple.com/jp/iphone/library/featuredarticles/ViewControllerPGforiPhoneOS/CombiningToolbarandNavigationControllers/chapter_9_section_1.html]]…Apple公式。
-[[Tab Bar Controller - Navigation Controller - TableView - iPhone Dev SDK Forum:http://www.iphonedevsdk.com/forum/iphone-sdk-development/2447-tab-bar-controller-navigation-controller-tableview.html]]
-[[第297日 Tab Bar ControllerとNavigation Controllerの組み合わせ - 俺のメモログ:http://d.hatena.ne.jp/ekiryu/20100530/p1]]…IBを使って組み込む方法。
-[[UITabBarController に UINavigationController を組み込む: iPhoneアプリ開発備忘録:http://iphone-app-developer.seesaa.net/article/130194298.html]]
**UIImageをスクロールさせる [#u6b69c31]
-[[Cocoaの日々: UIScrollView - サムネイル画像を並べて指でスクロールさせる:http://cocoadays.blogspot.com/2010/07/uiscrollview.html]]

**UIViewに吹き出しをつける [#rf2d1006]
-[[Rounded Corners with an arrow on a UIView with the iPhone SDK 3.0 « Steve @ DynamicEdge:http://steve.dynedge.co.uk/2010/03/09/rounded-corners-with-an-arrow-on-a-uiview-with-the-iphone-sdk-3-0/]]

**プログレスバーをオーバーレイ表示する [#c81bb587]
-[[MBProgressHUD]]

**ステータスバーにネットワークインジケーターを表示する [#v3feedbf]
#pre{{
//表示
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
 
//非表示
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO
}}

**モーダルビューを表示して閉じる [#n6cb0528]
-親ビューとやりとりすることを考えるとdelegateパターンを使うのがよさげ。
--[[[iPhone] モーダルビューの非表示、値の受け渡しはデリゲートで行う | Sun Limited Mt.:http://blog.syuhari.jp/archives/2079]]
--[[iPhone/iPad @protocolで自前のDelegate - 袖触れ合うも多少の縁:http://www.hirano-dept.com/blog/2011/01/iphoneipad-protocoldelegate.html]]
--[[iphone - Using delegate to pass data between views - Stack Overflow:http://stackoverflow.com/questions/7139667/using-delegate-to-pass-data-between-views]]
-[[Cocoaの日々: iOS5 では UIViewController.parentViewController が nil:http://cocoadays.blogspot.jp/2011/10/ios5-uiviewcontrollerparentviewcontroll.html]]をみるとiOS5とそれより前で親から閉じる方法がかわっているので、よりdelegateパターンを使った方がいいかもしれない。

**要素のサイズ [#w2957745]
-[[iPhone Development 101: Sizes of iPhone UI Elements:http://www.idev101.com/code/User_Interface/sizes.html]]



トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS