Detect if device properly displays UIVisualEffectView?

后端 未结 2 982
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-04 07:17

My app utilizes UIVisualEffectView to blur the background just like Control Center. But I discovered the iPad 2 (and Retina iPad) which can run iOS 8 isn\'t pow

2条回答
  •  独厮守ぢ
    2021-01-04 07:56

    Check this WWDC session: http://asciiwwdc.com/2014/sessions/419

    So, and to reiterate on what devices we don't blur and that we only do the tinting on the iPad 2 and iPad 3rd generation, we just apply the tint and we skip the blur steps.

    [...]

    On iPad 4th generation, iPad Air, iPad Mini, iPad Mini with retina display, iPhones and the iPod touch we do both the blur and the tinting.

    I guess you have to resort to checking for the machine name:

    #import 
    ...
    
    struct utsname systemInfo;
    uname(&systemInfo);
    
    NSString *deviceName = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding];
    ...
    

提交回复
热议问题