File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -263,17 +263,22 @@ - (IBAction)showQuestion:(id)sender
263263}
264264
265265- (IBAction )showSwitch : (id )sender {
266- SCLAlertView *alert = [[SCLAlertView alloc ] init ];
266+ SCLAlertView *alert = [[SCLAlertView alloc ] initWithNewWindow ];
267267 alert.tintTopCircle = NO ;
268268 alert.iconTintColor = [UIColor brownColor ];
269269 alert.useLargerIcon = YES ;
270270
271271 SCLSwitchView *switchView = [alert addSwitchViewWithLabel: @" Don't show again" .uppercaseString];
272272 switchView.tintColor = [UIColor brownColor ];
273273
274- [alert addButton: @" Done" actionBlock: ^(void ) {
275- NSLog (@" Show again? %@ " , switchView.isSelected ? @" -No" : @" -Yes" );
276- }];
274+ SCLButton *button = [alert addButton: @" Done" target: self selector: @selector (firstButton )];
275+
276+ button.buttonFormatBlock = ^NSDictionary * (void ) {
277+ NSMutableDictionary *buttonConfig = [[NSMutableDictionary alloc ] init ];
278+ buttonConfig[@" cornerRadius" ] = @" 17.5f" ;
279+
280+ return buttonConfig;
281+ };
277282
278283 [alert showCustom: self image: [UIImage imageNamed: @" switch" ] color: [UIColor brownColor ] title: kInfoTitle subTitle: kSubtitle closeButtonTitle: nil duration: 0 .0f ];
279284}
You can’t perform that action at this time.
0 commit comments