LoginSignup
5
1

More than 5 years have passed since last update.

Xcodeの補完時に出てくるEditor Placeholderを使う

Posted at

補完した時に出てくる半透明のアレ
コレ


// Xcodeが自動生成してくれるPlaceholder
<#T##hoge#>

// コレでも作れる
<#fuga#>

で作ることができる。tabでどんどん次のPlaceholderに移動できるので、例えば


titleLabel.reactive.text <~ viewModel.title
titleLabel.reactive.isHidden <~ viewModel.shouldHideTitleLabel

descriptionLabel.reactive.text <~ viewModel.description
descriptionLabel.reactive.isHidden <~ viewModel.shouldHideDescriptionLabel

imageView.reactive.image <~ viewModel.image
imageView.reactive.isHidden <~ viewModel.shouldHideImageView

のように代入する値だけが違うコードをたくさん書く時に使えるかも。穴埋め問題も作れそう。

5
1
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
5
1