Commit 186fb7b0 by suolong

修改下礼物互动删除添加确定提示

parent ba85dfc7
#import "FUSLiveGiftInteractSettingItemCell.h"
#import "FUSLiveGiftInteractSettingItemModel.h"
#import <FUSFoundation/FUSAlertView.h>
@interface FUSLiveGiftInteractSettingItemCell ()
......@@ -143,9 +144,27 @@
}
- (void)onClickDelete {
if (self.deleteHandler && self.itemIndex != NSNotFound) {
self.deleteHandler(self.itemIndex);
if (!self.deleteHandler || self.itemIndex == NSNotFound) {
return;
}
__weak typeof(self) weakSelf = self;
[FUSAlertView showAlertWithTitle:[NSString fus_localString:@"确认删除该礼物互动吗?"]
message:nil
cancelButtonTitle:[NSString fus_localString:@"取消"]
otherButtonTitles:@[[NSString fus_localString:@"删除"]]
clickBlock:^(NSInteger buttonIndex) {
if (buttonIndex != 1) {
return;
}
__strong typeof(weakSelf) strongSelf = weakSelf;
if (!strongSelf) {
return;
}
if (strongSelf.deleteHandler && strongSelf.itemIndex != NSNotFound) {
strongSelf.deleteHandler(strongSelf.itemIndex);
}
}];
}
@end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment