简体   繁体   English

iOS缩放UIWindow,但statusBar无法缩放?

[英]iOS Scale UIWindow ,but the statusBar can not scale?

As you can see,The first pic is what effect i want.but the i just can make effect like pic 2.the statusBar can not scale with UIWindow. 如您所见,第一个图片是我想要的效果。但是我可以像图片2那样效果。statusBar无法使用UIWindow缩放。 what can i do? 我能做什么? who can give me some tips! 谁能给我一些提示!

  1. What i want: 我想要的是:

    在此处输入图片说明

  2. What i made: 我做了什么:

    在此处输入图片说明

In iOS, UIStatusBar is not a part of any UIWindow , so you scale an UIWindow take no effect on UIStatusBar . 在iOS中, UIStatusBar不属于任何UIWindow ,因此缩放UIWindow不会对UIStatusBar产生影响。

You can use snapshotViewAfterScreenUpdates: API to take a screenshot image, and show the image in UIImageView , than you can scale the UIImageView rather than the UIWindow . 您可以使用snapshotViewAfterScreenUpdates: API截取屏幕快照图像,并在UIImageView显示该图像,而不是可以缩放UIImageView而不是UIWindow

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM