1
我從這裏實現自定義的iOS AlertView:https://github.com/wimagguc/ios-custom-alertview使用自定義iOS AlertView,按鈕關閉警報?
和繼承人,我怎麼實現它:
CustomIOSAlertView *alertView = [[CustomIOSAlertView alloc] init];
[alertView setButtonTitles:[NSMutableArray arrayWithObjects:@"Cancel", @"Next", nil]];
[alertView setUseMotionEffects:true];
[alertView setContainerView:view];
[alertView show];
所以,問題是,我沒有叫alertView close
但它在任任意點擊關閉按鈕,這不是我想要的
任何人都知道此修復?
我該如何讓它不是默認? – farhan
在您的自定義AlertView中,您需要更改庫的本機代碼。我在CustomIOSAlertView.m中找到它 - (void)customIOS7dialogButtonTouchUpInside :(CustomIOSAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { NSLog(@「Button Clicked!%d,%d」,(int)buttonIndex, [alertView標籤]); [self close]; } – nynohu