Add Gaussian blur, iOS7 create snapshot under iOS8

Source: Internet
Author: User

1.

Uiimageview *imageview = [[Uiimageview alloc]initwithimage:[uiimage imagenamed:@"img_0004"]]; Imageview.frame= CGRectMake (0,0, the,720);    [Self.view Addsubview:imageview]; //add Gaussian blur under iOS8, there are 3 types of blurUivisualeffectview *effectview =[[Uivisualeffectview Alloc]initwitheffect:[uiblureffect Effectwithstyle:uiblureffectstyledark]]; Effectview.frame= CGRectMake (0, -, the, -);    [ImageView Addsubview:effectview]; //UIButton *btn =[UIButton Buttonwithtype:uibuttontypesystem]; Btn.frame= CGRectMake (Ten, -, -, +); Btn.backgroundcolor=[Uicolor Cyancolor]; [BTN Settitle:@"btn"Forstate:uicontrolstatenormal]; [Effectview.contentview addsubview:btn];

2.

 Uiimageview *showview = [[Uiimageview alloc] Initwithframe:cgrectmake (0, 0 , 100 , 100      = [UIImage imagenamed:@ "     img_0003    //  captured view, set no transparency to 0,yes transparency of 1     UIView *snap1 = [ShowView Snapshotviewafterscreenupdates:no];    Snap1.center  = Self.view.center;    [Self.view ADDSUBVIEW:SNAP1]; NSLog ( @ " alpha=%f   ", Snap1.alpha); 

Add Gaussian blur, iOS7 create snapshot under iOS8

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.