// // CustomAlertView.h // JasonDevelop // // Created by Jason Lee on 3/6/14. // Copyright (c) jasondevelop. All rights reserved. // @import UIKit; #import "CustomLabel.h" #import "CustomButton.h" #import "CommonUtil.h" #import "CustomImageView.h" #define kfLabelTopMargin 15.0f #define kfLabelBottomMargin 15.0f #define kfLabelMargin 15.0f #define kfButtonOriginX 15.0f #define kfButtonMargin 10.0f #define kfBottomMargin 15.0f #define kfBodyMargin 2.0f @class CustomAlertView; typedef void(^CustomAlertViewCallBackHandler)(CustomAlertView *alertView, NSInteger buttonIndex); @interface CustomAlertView : UIView { @protected NSString *_okButtonTitle, *_cancelButtonTitle; } @property (weak, nonatomic) IBOutlet UIView *popUpView; @property (weak, nonatomic) IBOutlet UIView *containerView; @property (weak, nonatomic) IBOutlet UIView *maskingView; @property (weak, nonatomic) IBOutlet UILabel *lblTitle; @property (weak, nonatomic) IBOutlet CustomLabel *lblMessage1; @property (weak, nonatomic) IBOutlet CustomImageView *imgTitleBar; @property (weak, nonatomic) IBOutlet UIImageView *popUpTitleImage; @property (weak, nonatomic) IBOutlet CustomButton *btnConfirm; @property (weak, nonatomic) IBOutlet CustomButton *btnCancel; @property (weak, nonatomic) IBOutlet CustomButton *btnConfirmSingle; @property (weak, nonatomic) IBOutlet NSLayoutConstraint *constraintBtnSameWidth; @property (weak, nonatomic) IBOutlet NSLayoutConstraint *constraintBtnConfirmWidth; @property (weak, nonatomic) IBOutlet NSLayoutConstraint *constraintPopupHeight; /** 커스텀 얼럿을 제공한다. @param title 얼럿타이틀 @param message 메시지 @param delegate 딜리게이트 @param okButtonTitle OK버튼이름 @param cancelButtonTitle Cancel버튼이름 @return CustomAlert* */ - (id)initWithTitle:(NSString *)title message:(NSString *)message delegate:(id)delegate OKButtonTitle:(NSString *)okButtonTitle cancelButtonTitle:(NSString *)cancelButtonTitle; - (void)show; - (void)showWithCompletion:(CustomAlertViewCallBackHandler)completion; - (void)hide; - (IBAction)btnConfirmTouched:(id)sender; - (IBAction)btnCancelTouched:(id)sender; @end