タグ

2013年8月2日のブックマーク (3件)

  • Singletons, AppDelegates and top-level data.

    Please note: this article is part of the older "Objective-C era" on Cocoa with Love. I don't keep these articles up-to-date; please be wary of broken code or potentially out-of-date information. Read "A new era for Cocoa with Love" for more. If you require only a single instance of an object in your application, where should it go? How should you control and manage it? Here are some different appr

    Singletons, AppDelegates and top-level data.
    KatagiriSo
    KatagiriSo 2013/08/02
    AppDelegateを便利なSingletonとして使わない、Singletonは必要な物以外は作らない。またSigletonは他のプログラムとのつながりを0にする。
  • Xcodeのコーディング効率が上がるかもしれないTips - アールケー開発

    Xcode 4.x.xを使っていて、コーディングの効率があがる方法をメモってみます。 ファイルを素早く移動 XCodeはナビゲータエリアでファイルを管理します。良くできていて、ファイルシステムのディレクトリ構成とは関係なくグループ分けとかができる点も良いのですが、ファイルがいっぱい増えてくると、特定のファイルを見つけるのが大変になってきます。 それでも良くできていて、下端に付いているフィルタリング機能でファイル名の一部とかでフィルタリングすることもできます。しかし、頻繁にファイルを切り替えるのには不向きです。 こんなとき便利なのが「File」メニューの「Open Quickly」。実行すると専用のウインドウが出て、ファイル名の一部でファイルが絞り込まれて、そのまま開けます。このショートカットの「Command+Shift+O」を覚えてくとさらに便利。キーボードだけでファイルを切り替えられま

    Xcodeのコーディング効率が上がるかもしれないTips - アールケー開発
  • iOS Best Practices – Singletons

    Problem Many examples found online utilize the AppDelegate instance for global storage/variables.  While this is a quick way of sharing data and methods between views and classes it can (and usually does) lead to several problems: No control over global variables/storage Each referencing class assumes direct control over this variable and won’t necessarily respect how another class is expecting to

    iOS Best Practices – Singletons
    KatagiriSo
    KatagiriSo 2013/08/02
    AppDelegateが肥大化する問題はグローバル変数を置き場に使われてしまう点にある。