| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- //
- // 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
- #define kfTopInset 0
- #define kfRightInset 20
- #define kfBottomInset 0
- #define kfLeftInset 20
- @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 CustomLabel *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 CustomButton *btnCancelSingle;
- @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;
- - (IBAction)btnCancelSingleTouched:(id)sender;
- - (void)hideWithButtonIndex:(NSInteger)index;
- @end
|