68 lines
1.9 KiB
Objective-C
68 lines
1.9 KiB
Objective-C
//
|
|
// LMDeleteMiyouAlertView.m
|
|
// SweetParty
|
|
//
|
|
// Created by Xmac on 2024/8/8.
|
|
//
|
|
|
|
#import "LMDeleteMiyouAlertView.h"
|
|
|
|
@interface LMDeleteMiyouAlertView ()
|
|
|
|
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
|
|
@property (weak, nonatomic) IBOutlet UIButton *confirmButton;
|
|
@property (weak, nonatomic) IBOutlet UIView *mineView;
|
|
|
|
@end
|
|
|
|
@implementation LMDeleteMiyouAlertView
|
|
|
|
- (void)awakeFromNib
|
|
{
|
|
[super awakeFromNib];
|
|
self.confirmButton.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(125, 44) direction:(FXGradientChangeDirectionHorizontal) startColor:mainLightColor endColor:mainDeepColor];
|
|
self.mineView.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(APPW-30, 166) direction:FXGradientChangeDirectionHorizontal startColor:HEXCOLOR(0xDFFFF6) endColor:HEXCOLOR(0xFFFFFF)];
|
|
self.titleLabel.text = [NSString stringWithFormat:@"清除此关系需要%@钻",GVUSER.del_user_relation_money];
|
|
}
|
|
|
|
- (IBAction)confirmButtonClick:(UIButton *)sender {
|
|
|
|
[BJHttpTool BJ_Del_user_relationWithParameters:@{@"user_relation_id":self.fid} success:^(id response) {
|
|
[HelpPageDefine showMessage:response[@"msg"]];
|
|
if (self.sucBlock){
|
|
self.sucBlock();
|
|
}
|
|
[self sheetViewforViewClose];
|
|
} failure:^(NSError *error) {
|
|
|
|
}];
|
|
}
|
|
|
|
|
|
- (IBAction)cancelButtonClick:(UIButton *)sender {
|
|
[self sheetViewforViewClose];
|
|
}
|
|
|
|
- (void)sheetViewforViewAppear
|
|
{
|
|
//滑出动画
|
|
[UIView animateWithDuration:0.3 animations:^{
|
|
self.mineView.frame = CGRectMake(0, 0, ScreenWidth, self.mineView.height);
|
|
} completion:^(BOOL finished) {
|
|
}];
|
|
}
|
|
|
|
|
|
- (void)sheetViewforViewClose
|
|
{
|
|
self.backgroundColor = HEXCOLORA(0x000000, 0);
|
|
[UIView animateWithDuration:0.3 animations:^{
|
|
self.frame = CGRectMake(0, ScreenHeight, ScreenWidth, ScreenHeight);
|
|
} completion:^(BOOL finished) {
|
|
[self removeFromSuperview];
|
|
}];
|
|
}
|
|
|
|
|
|
@end
|