Advantages
used only native controllers
Single line code
easy to use
Disadvantage
cannot be used for complicated purposes
unable to use for alert view with textFields
How to integrate in your project? Add Singleton.h & Singleton.m in your project.
For alert view use the following method for showing alert and if you need to get the action of an alert pass actionHandler.
[[Singleton sharedInstance] showAlertWithTitle:@"alert title" message:@"alert message" arrayOfOtherButtonTitles:@[@"OK",@"1",@"2"] cancelButtonTitle:@"Cancel" presentInViewController:self actionHandler:^(NSString *buttonTitle, NSInteger buttonIndex/**For cancel, buttonIndex will be zero*/) { NSLog(@"button action %d %@",(int)buttonIndex,buttonTitle); }];
For action sheet use the following method for showing action sheet and if you need to get the action of an action sheet pass actionHandler.
NSLog(@"button action %d %@",(int)buttonIndex,buttonTitle);
}];```