TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Nov 2016 |
Maintained by Meniny.
MXDialog
is an Android like alert view.
#import "MXDialog.h"
MXDialog *d = [MXDialog builder];
[d show];
[d hide];
NSString *title = @"Dialog";
NSString *message = [NSString stringWithFormat:@"Some message\nLine break, Line break, Line break, Line break, Line break\nRandom Number:%zd", arc4random_uniform(200)];
[d setTitle:title]
[d setMessage:message];
[d setIcon:[UIImage imageNamed:@"android"]];
[d setPositiveButton:@"OK" onClickListener:^(MXDialog * _Nonnull dialog) {
NSLog(@"OK Clicked");
[dialog hide];
}];
[d setNegativeButton:@"Cancel" onClickListener:^(MXDialog * _Nonnull dialog) {
NSLog(@"Cancel Clicked");
[dialog hide];
}];
UIImageView *image = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"android"]];
[image setContentMode:UIViewContentModeScaleAspectFit];
[d setView:image];