CatDetailViewController is a simple way to create detail information style viewcontrollers, such as text, date or table! CatDetailViewController can make your code compectly, new way to replace delegate!
CatDetailViewController is available on CocoaPods. Just add the following to your project Podfile:
pod 'CatDetailViewController'
-(instancetype)initChinaCityPickerViewWithTitle:(NSString *)title
saveHandle:(void(^)(NSString *saveResult))saveHandle;
- allowResultEmpty: A boolean value that the empty information alertview show(Default is NO)
- emptyResultAlertViewMessage: The text for empty alertview message
- enableConfirmAlertView: A boolean value that the confirm information alertview show(Default is NO)
- saveConfirmAlertViewMessage: The text for save alertview message
- saveConfirmAlertViewTitle: The text for save alertview title
#import "CatDetailViewController"
CatDetailViewController *detailView = [[CatDetailViewController alloc] initSingleSectionViewWithTitle:@"Select Color" sections:@[@"Red",@"Blue"] defaultSectionText:cell.detailTextLabel.text saveHandle:^(NSString *saveResult) {
//Do anything you want
}];
[detailView detailViewShowOnViewController:self];
CatDetailViewController is depend on UINavigationController, so don't forget it!