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.
hiddenUIViewのプロパティを観察したいとしましょう:
hidden
@property(nonatomic, getter=isHidden) BOOL hidden
キーパスhiddenまたはのオブザーバーを追加しますかisHidden?
isHidden
hidden.
反対側から考えてみましょう: プロパティを設定します。セッターはsetHidden:,notsetIsHidden:になり、プロパティの割り当ては, self.hidden = flagnotになりますself.isHidden = flag。
setHidden:
setIsHidden:
self.hidden = flag
self.isHidden = flag