UIAlertController * alert= [UIAlertController
alertControllerWithTitle:@"Title" //alert Title
message:@"Msg sfdgfdjsgajgasgasgsfjkgsfjkgfsgksdgfhvbhbdfjkvbsbvjsdfbvjsdbvbdsvbdjbvdbvdbjvdbjvbdsfbvj v hsfv hfs vhjsf vf hv sjfvbjs f" //Your Message
preferredStyle:UIAlertControllerStyleAlert];
UIView *firstSubview = alert.view.subviews.firstObject;
UIView *alertContentView = firstSubview.subviews.firstObject;
for (UIView *subSubView in alertContentView.subviews) {
subSubView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"OTP.png"]];
}
UIAlertAction* ok = [UIAlertAction
actionWithTitle:@"OK"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
{
[alert dismissViewControllerAnimated:YES completion:nil];
}];
[alert addAction:ok];
[self presentViewController:alert animated:YES completion:nil];
No comments:
Post a Comment