首页 > 代码库 > 自定义弹框加载方式

自定义弹框加载方式

- (void)show

{

    if ([UIApplication sharedApplication].keyWindow.rootViewController.navigationController) {

        [[UIApplication sharedApplication].keyWindow.rootViewController.navigationController.view addSubview:self];

    }else{

        [[UIApplication sharedApplication].keyWindow addSubview:self];

    }

}

 

- (void)close

{

    priceBlock(priceLable.text.intValue);

    [self removeFromSuperview];

}