- [SDK]iPhoneアプリ開発初心者質問箱39[touch][iPad]
867 :名称未設定[sage]:2014/08/15(金) 01:15:20.38 ID:iZho1Ezx0 - ちゃんと公式のドキュメントに丁寧に説明あるよ
https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html#//apple_ref/doc/uid/TP40011210-CH5-SW2 Important: If you use @synthesize without specifying an instance variable name, like this: @synthesize firstName; the instance variable will bear the same name as the property. In this example, the instance variable will also be called firstName, without an underscore. もし@synthesizeを変数指定なしで使ったら、インスタンス変数名はプロパティ名と同じになる もちろん、Auto-synthesizeのほうはアンダースコアありで定義されるからその違いはあってややこしいけど。 まあAuto-synthesize使ってる限り、ここにいちいち悩む必要性は全く無いわけだが
|
|