Closed dereknex closed 7 years ago
Add custom view support , how to use: - (id)initWithTitle:(NSString *)title andCustomView:(UIView *)customView;
- (id)initWithTitle:(NSString *)title andCustomView:(UIView *)customView;
example:
UITextField *field = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, 200, 44)]; [field setFont:[UIFont systemFontOfSize:40.0]]; [field setBorderStyle:UITextBorderStyleRoundedRect]; //field.backgroundColor = [UIColor redColor]; SIAlertView *alertView = [[SIAlertView alloc] initWithTitle:@"Custom View" andCustomView:field]; [alertView addButtonWithTitle:@"Cancel" font:nil color:[UIColor orangeColor] type:SIAlertViewButtonTypeCancel handler:^(SIAlertView *alertView) { NSLog(@"Cancel Clicked"); }]; [alertView show]; }
Add custom view support , how to use:
- (id)initWithTitle:(NSString *)title andCustomView:(UIView *)customView;
example: