struct Notification { let postImageURL: String? let postID: String?
var userIsFollowed = false } Notification 구조체가 있다고 합시다. var notifications = [Notification]() { didSet { tableView.reloadData() } } 이 구조체를 이용해서 프로퍼티 감시자를 가진 배열을 하나 만들었습니다. 프로퍼티 감시자는 다음 세가지 모든 상황에서 호출됩니다. self.notifications = notifications notifications[index] = Notification() notifications[index].userIsFollowd = isFollowed 1.
프로.....
원문 링크 : 프로퍼티 감시자가 호출되는 경우 [Swift]