自定义uialertview的字体和大小颜色等

- (IBAction)showBigAlert:(id)sender {

     UIAlertView* find = [[UIAlertView alloc] initWithTitle:@"big size view" message:@"do you see it" delegate:self cancelButtonTitle:@"ok" otherButtonTitles:nil, nil];

    //[find setDelegate:self];

    /*

    UIAlertView *find = [[UIAlertView alloc] initWithFrame:CGRectMake(5, 20, 320,700)];

    find.title=@"big size view" ;

    find.message=@"some message";

     */

    [find show];

    [find release];

    

}

//- (void)willPresentAlertView:(UIAlertView *)alertView

-(void)willPresentAlertView:(UIAlertView *)alertView {

    [alertView setFrame:CGRectMake(1, 20, 1000, 600)]; 

    for( UIView * view in alertView.subviews )

    {

        if( [view isKindOfClass:[UILabel class]] )

        {

            UILabel* label = (UILabel*) view;

            label.textAlignment = UITextAlignmentLeft;

            label.font=[UIFont fontWithName:@"STHeitiSC-Medium" size:18];

            label.textColor=[UIColor greenColor];

            

        }

if ( [view isKindOfClass:[UIButton class]] )

    }

}

你可能感兴趣的:(自定义uialertview的字体和大小颜色等)