Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
重複の可能性: @property @synthesize
いつプロパティを使用し、要素をNSArray、NSSTring ....、またはIBOuteltをUIButtonまたはUITextFiledとして合成する必要がありますか?
プロパティは主に、他のオブジェクトがオブジェクト内のivarを変更またはアクセスする必要がある場合に使用されます。ゲッターとセッターを手動で定義するか、@ propertyを使用しないと、他のオブジェクトはivarを表示または変更できません。プロパティは、メモリ管理の便宜のためにもよく使用され、メモリリークの防止に役立ちます。