将代码在有xib得情况下设置到最底层(即执行顺序不是先执行xib) 将图片毛玻璃状态

在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];

 

posted @ 2016-05-31 14:20  我叫小小虎  阅读(397)  评论(0编辑  收藏  举报