问题
I am developing a recording app, and I'd like to show a pulsing red double-height status bar on top of my app while the app is recording, and while the user is still in the app - just like Voice Memos. How do I do that? I can get it so that the double-height red status bar appears when I am outside the app, but not while inside the app. Any hints? Is it actually possible at all?
回答1:
to answer the last question first: it is possible, though i don't know whether the mechanism for causing to happen in other apps can be applied to your own.
to answer your next to questions "how do i do that? any hints?": one hint would be to simply hide the [UIApplication sharedApplication] statusBar inside of your app conditionally based up whether you are in record mode or not, and create your own pulsing status bar to simulate the one that is being presented in other apps. i hide the status bar conditionally in one of my apps, and you can then present whatever you want in the status bar area.
来源:https://stackoverflow.com/questions/11319382/ios-pulsing-red-double-height-status-bar