ios-custom-alertview icon indicating copy to clipboard operation
ios-custom-alertview copied to clipboard

impossible to add variable label (IBOutlet) in containerview before [show]

Open JoeriBultheel opened this issue 8 years ago • 0 comments

Hi,

I'm using a xib file as the containerView for the CustomIOSAlertView. It has an IBOutlet UILabel of which I want to set the text before showing the AlertView. Thusfar I cannot get it to work: The view doesn't recognize the selector setLabelText: I think because the -awakeFromNib is never called ?

Is there an example of this working somewhere? how could I achieve this? code:

ConfirmEmailAlertView *emailAlertView = [[ConfirmEmailAlertView alloc] init];
emailAlertView.layer.cornerRadius = 7;
emailAlertView.layer.masksToBounds = YES;
[emailAlertView setEmailtext:self.txtEmail.text];
CustomIOSAlertView *emailAlert = [[CustomIOSAlertView alloc] init];
[emailAlert setContainerView: emailAlert];
emailAlert.alpha = 0.95;
[emailAlert setButtonTitles:[NSMutableArray arrayWithObjects:@"NO", @"YES", nil]];
[emailAlert setDelegate:self];

[emailAlert show];

THNX !

JoeriBultheel avatar Oct 07 '16 12:10 JoeriBultheel