#DCCustomPopup
+ (void)customPopViewWithTitle:(NSString *)title message:(NSString *)message image:(UIImage *)image;
- (DCCustomPopupView *)initWithTitle:(NSString *)title message:(NSString *)message image:(UIImage *)image;
- (void)show;
- (void)customPopupView:(DCCustomPopupView *)popupView clickedButton:(UIButton *)button;
- (IBAction)showPopup:(id)sender {
// Show Popup without init
[DCCustomPopupView customPopViewWithTitle:titleTextField.text message:subtitleTextView.text image:nil];
}
- (IBAction)show:(id)sender {
// create instance of DCCustomPopupView
UIImage *image = [UIImage imageNamed:@"alert_no"]; // image: 50x50px || 100x100px(@2x)
DCCustomPopupView *customPopupView = [[DCCustomPopupView alloc] initWithTitle:@"Title" message:@"Subtitle Subtitle Subtitle" image:image];
[customPopupView setDelegate:self];
[customPopupView setTag:1];
[customPopupView show];
}
// Delegate method
- (void)customPopupView:(DCCustomPopupView *)popupView clickedButton:(UIButton *)button {
if (popupView.tag == 1) {
NSLog(@"Button was clicked");
}
}