Is there a way to customize the UIStatusBar
class?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
For an example what you can do with (or around) the status bar, look at this Github project: https://github.com/myell0w/MTStatusBarOverlay
I have used it in a project of mine, and it goes through app review just fine.
回答2:
You can not customize the UIStatusBar. What you can do, is to put another UIView on top (with any customizations you want).
For example, something like:
MyView * myview = [[MyView alloc] initWithFrame:[[UIApplication sharedApplication] statusBarFrame]];
[[[UIApplication sharedApplication] keyWindow] addSubview:myview];