Delegate vs Notification in iOS

Both terminology provide a way by which iOS object communication to each other in iOS application Delegate faster creates a has-a relationship between the two classes Good architecure, You gain compile time checking for required methods when you use  protocols with your delegates, so you know when you compile if you're missing any required methods... Continue Reading →


How to create .pem for apple push notification

To enable Push Notification for your iOS app, we will need you to create and upload the Apple Push Notification Certificate (.pem file) to us so we will be able to connect to Apple Push Server on your behalf. Step 1: Login to iOS Provisioning Portal, click "Certificates" on the left navigation bar. Then, click... Continue Reading →

Call a function using Notification in Xcode

Step 1: Post Notification from class A.NSString *data=@"Demo";[[NSNotificationCenter defaultCenter] postNotificationName:@"golferUpdate" object:nil userInfo:data];if you do not want to pass data use [[NSNotificationCenter defaultCenter] postNotificationName:@"golferUpdate" object:nil];Step 2: Register Notification in Class B.[[NSNotificationCenterdefaultCenter] addObserver:selfselector:@selector(GetData:) name:@"golferUpdate"object:nil];Step 3: Add function GetData-(void)GetData:(NSNotification *)notification{    NSDictionary *dict = [notification userInfo];// write your code Here}  Step 4: Enjoy Coding………..Best Of Luck.

Blog at

Up ↑

%d bloggers like this: