Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 自定义UIAlertView的步骤_Iphone_Xcode_Uialertview - Fatal编程技术网

Iphone 自定义UIAlertView的步骤

Iphone 自定义UIAlertView的步骤,iphone,xcode,uialertview,Iphone,Xcode,Uialertview,这是我在按钮操作中的代码。我想使我的AlertView对我的页面透明。如何做到这一点 请帮我完成我的任务 alert=[[UIAlertView alloc]initWithTitle:@"error" message:@"qwwqreqrgvsdfhbsb" delegate:self cancelButtonTitle:@"dismiss"otherButtonTitles:Nil, nil]; [alert show]; UILabel *theTitle =

这是我在按钮操作中的代码。我想使我的AlertView对我的页面透明。如何做到这一点

请帮我完成我的任务

    alert=[[UIAlertView alloc]initWithTitle:@"error" message:@"qwwqreqrgvsdfhbsb" delegate:self cancelButtonTitle:@"dismiss"otherButtonTitles:Nil, nil];

    [alert show];

    UILabel *theTitle = [alert valueForKey:@"_titleLabel"];
    [theTitle setTextColor:[UIColor redColor]];

    UILabel *theBody = [ alert valueForKey:@"_bodyTextLabel"];
    [theBody setTextColor:[UIColor redColor]];
设置背景

[alert setDimsBackground:NO];

这个问题有什么问题?