alertView otherButtonTitles:@“”,@“”崩溃 空格


- (id)initWithTitle:(NSString*)title params:(NSMutableDictionary*)params

{

    self.params = params;

    if(self){

    if (self= [superinitWithTitle:title message:@""delegate:selfcancelButtonTitle:@"关闭"otherButtonTitles:@“”,@“”,nil]){

        [selfaddButtonWithTitle:CASH_QUERY_MODIFY_BTN];

        [selfaddButtonWithTitle:CASH_QUERY_CANCE_BTN];

        self.delegate =self;

    }

    }

    return self;

}


将红色部分修改为:if (self= [super initWithTitle:title message:@"" delegate:self cancelButtonTitle:@"关闭" otherButtonTitles:@“ ”,@“ ”,nil]) 


或者if (self= [super initWithTitle:title message:@"" delegate:self cancelButtonTitle:@"关闭" otherButtonTitles:,nil]) 




- (id)initWithTitle:(NSString*)title params:(NSMutableDictionary*)params

{

    self.params = params;

    if (self= [super initWithTitle:title message:@"" delegate:self cancelButtonTitle:@"关闭" otherButtonTitles:nil]) {

        [self addButtonWithTitle:CASH_QUERY_MODIFY_BTN];

        [self addButtonWithTitle:CASH_QUERY_CANCE_BTN];

        self.delegate = self;

    }

    return self;

}


- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex{

    if(buttonIndex == 1){

        HsCommonPage *page = [HsComponentFactory createAndRegComponent:@"cashModifyPage"

                                                             withParam:_params

                                                                    ID:@"cashModifyPage"];

        

        [[HsViewController sharedManager] addPageToTop:page];

    }

    else if(buttonIndex == 2){

        [[HsSearchPageSupport sharedManager] askConfirmToProductCancel:_params];

    }

    else{

        return;

    }

}



你可能感兴趣的:(alertView otherButtonTitles:@“”,@“”崩溃 空格)