2017/04/18

【iOS】CocoaPodsでライブラリの更新

PodsのPodfileに
pod 'ライブラリ名', '~> バージョン'

例:
pod 'RealmSwift', '~> 2.5.1’

ターミナルで
$ cd Podfileのあるディレクトリ
$ pod update

例:
$ cd iOSApp/appName/
$ pod update

2016/11/16

【iOS】【swift3】コードからstoryboardに画面遷移する

Next.storyboard 、storyboard idはnext に遷移する場合
       let storyboard = UIStoryboard(name: "Next", bundle: nil)
       let nextVC = storyboard.instantiateViewController(withIdentifier: "next")
       self.present(nextVC, animated: true, completion: nil)


NavigationControllerを使う場合は
       let storyboard = UIStoryboard(name: "Next", bundle: nil)
       let nextVC = storyboard.instantiateViewController(withIdentifier: "next")
       let navigationController = UINavigationController(rootViewController: nextVC)
       self.present(navigationController , animated: true, completion: nil)

これでNavigation Barが表示される。

2016/10/31

Handlerを使った遅延処理

3秒後にdelayFunを実行
new Handler().postDelayed(delayFunc, 3000);

    private final Runnable delayFunc = new Runnable() {
        @Override
        public void run() {
            // 遅延処理
        }
    };

2016/06/17

styleでToolbarのタイトルの文字の色とhomeAsUpIndicator(戻る矢印)の色を変える

白に変える場合は
    

    

    

    

2016/06/15

traces.txt をPCに保存する

adb /data/anr/traces.txt

c:/android-sdk/platform-tools/traces.txt
または
ユーザー/(ユーザー名)/traces.txt
に保存される