在xib拖拽控件的界面给view添加背景
UIImageView *imageView = [[UIImageView alloc]initWithFrame:self.view.bounds];
imageView.image = [UIImage imageNamed:@"51670.jpg"];
[self.view insertSubview:imageView atIndex:0];(这句代码就是将图片放到最底层)
将背景模糊(毛玻璃状态)
UIToolbar *toolBar = [[UIToolbar alloc]initWithFrame:CGRectMake(0, 0, imageView.frame.size.width, imageView.frame.size.height)];
toolBar.barStyle = UIBarStyleBlack;
[imageView addSubview:toolBar];
时间: 2024-10-09 08:35:14