LoginSignup
2
3

More than 5 years have passed since last update.

Objective Cメモ

Last updated at Posted at 2017-04-23

プロパティ

http://qiita.com/uasi/items/80660f9aa20afaf671f3
https://www.ecoop.net/memo/archives/objective-c-property-basics.html
http://qiita.com/a_ishidaaa/items/6461f62a1a12208b0c50

整数から文字列を生成する

NSArray・NSDictionary

辞書・配列リテラルの簡潔な書き方、便利やな〜🙂

NSArrayとNSMutableArrayの相互変換

NSArrayからNSMutableArrayを作る
NSArray* array = @[@"hoge", @"fuga", @"piyo", @"foo", @"bar"];
NSMutableArray* mArray2 = [array mutableCopy];

enumerateObjectsUsingBlock:メソッドが便利

各要素ごとに、要素・インデックスを引数に取るブロックで処理を書ける。逆順・処理の並列化も可能。

NSArrayでfor(; ;)とかfor-inを使うのをやめて、enumerateObjectsUsingBlock:を使う

[Objective-C] 配列から特定要素を安全に削除する

[iPhone] NSMutableArray の使い方 (Objective-C)

Obj CのLightweight Genericsを使う

AppleDoc

2
3
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
3