2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AppCodeにスニペットの登録

2
Last updated at Posted at 2012-12-26
  • AppCodeを開いて Settings => Live Templates から編集可

  • Abbreviation : 登録名

  • Description : 説明

  • ステークホルダーにしたい値は$で囲む => $hoge$

  • Edit valiablesボタンを押すと$で囲んだ値の設定ができる

    • Name => $で囲まれた値
    • Expression => スニペット呼んだときに補完リスト?が開かれる。詳細はよくわかってない。。。
    • Default Value => デフォルト値

--

例). UIViewのframeのログを吐き出す

Abbreviation => logf
Description => log frame value

CGRect frame = $frame$
NSLog(@"frame => ((%f, %f), (%f, %f))", frame.origin.x, frame.origin.y, frame.size.width, frame.size.height);

Settingは以上。

あとはコード書く際に、
logfとタイプしてからTabキーを押すと補完できます。

--

Xcodeに登録しているスニペットも呼べたら良いんですけど、そんな機能はないんですかねー。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?