ios - NSNotificationCenter - Observer Pattern: Ok, but in mobile apps? -
why using nsnotificationcenter(ios) in mobile apps. mean dont have many ui controls update on view. if need pass downwards caller of view utilize delegate.
it might justifiable in logical sense if have many views in navigation control, , have each view downwards navigation update - in situations nsnotificationcenter gets play?
thanks regards
in situations mention, shouldn't utilize notifications -- doesn't have mobile apps, same criteria apply desktop apps well. notifications best used if need multiple objects hear event, or in cases, 2 view controllers far apart in overall scheme of controllers, it's hard have 1 view controller set delegate of other.
ios
No comments:
Post a Comment