제 코드에는 약 012+가 약 NSNotification
입니다.NSNotificationCreation은 응용 프로그램 성능에 영향을 줍니까?
[[NSNotificationCenter defaultCenter] addObserver....];
[[NSNotificationCenter defaultCenter] postNotificationName...];
등록 및 화재 알림 기능을 많이 사용하면 응용 프로그램 성능에 영향을 줍니까?
이는 처리 방법에 따라 다릅니다. – Rajesh
사용 후 특정 알림을 제거해야합니다. 그렇지 않으면 twise 이상을 호출 ... 동일한 작업을 수행하는 데 Custom Delegate 프로토콜을 사용하는 것이 좋습니다. NSNotification 센터 대신 훨씬 좋습니다. –
@ NitinGohel의 포인트를 확장하려면 to-many 통신에는 'NSNotificationCentre'를 사용하고, to-one에는 대리자 또는 콜백을 사용하십시오. 여기의 관계는 무엇입니까? 또한 중복 된 알림을 전송할 수있는 경우 [NSNotificationQueue'] (https://developer.apple.com/library/ios/documentation/cocoa/reference/foundation/Classes/NSNotificationQueue_Class)의 병합 기능을 살펴볼 수 있습니다. /Reference/Reference.html) –