snapshotViewAfterScreenUpdates glitch on iOS 8

后端 未结 3 1931
Happy的楠姐
Happy的楠姐 2021-02-01 19:13

I\'ve noticed running this would cause view (or main window, not sure) to resize for a moment, when running on iPhone 6/6+ simulator scaled from iPhone 5 layout (without passing

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-01 19:56

    I just had this issue.

    The reason was that I didn't have launch images suitable for iPhone 6 nor 6 plus. Another issue I saw because of this non-existing image was that I got size for iPhone 5 when I asked the screen size bounds like this:

    CGSize screenSize = [[UIScreen mainScreen] bounds].size;
    

    When I fixed these images, this issue was fixed.

    P.S - it should work whether you use asset catalog or nib file for the launch image. In the asset catalog you should add the 'V' in right side (Attributes Inspector) under iOS 8 and later, and set images for 'Retina HD 5.5' (for 6 plus) and 'Retina HD 4.7' (for iPhone 6)

提交回复
热议问题