2

I'm creating a zombie preparedness app for iOS and I thought it would be cool to have an "Apocalypse mode" which is similar to Airplane mode in that it replaces the status bar carrier icon with a little airplane except possibly with a little mushroom cloud or something instead?

Apocalypse mode would just be a boolean flag in my app the disables all data connection required features (only within the app, not using any private APIs or anything...). If possible, I would still like to have the clock, battery life, Bluetooth icons and whatever else that pops up onto the status bar during normal operation.

I'm looking at the MTStatusBarOverlay library to implement this feature. Related (Stackoverflow post here). I know there is a possibility my app could get rejected for style because of this, but my thought is that I don't want to stray to far from the norm and cross my fingers Apple doesn't jump on me for it.

My question is

  1. How can I copy over the clock and battery life icons? Do I need to hook into an event or is there a UI element I can add.
  2. Am I going about this the right way? Would it be better to just make a transparent overlay on top of the normal status bar with a mushroom cloud that overlays the carrier icon instead of replacing the status bar entirely? I'm worried about variable length carrier icons...

Of course option 3 is I just forget that idea entirely and make some sort of different background or something for this mode, but that seems lame :P

Community
  • 1
  • 1
Ben Holland
  • 2,309
  • 4
  • 34
  • 50
  • I have a feeling your app may not be approved if you are going to just "disable" the users' data connections. – runmad May 16 '12 at 15:58
  • It's only effective within my app. My app provides services the work both offline and online. I would like to disable the online services I provide in my app and use a nifty little icon to denote the mode (only within the app). – Ben Holland May 16 '12 at 16:06

1 Answers1

2

I had a go with something similar a while ago. I created a status bar overlay that accepted touch events, but didn't block the status bar from receiving touches, which is crucial for app store acceptance.
You can check out my question and my answer, however keep in mind it might not be actual anymore, it worked great in iOS4, but never tested it on 5. Worth a try though.

As for the overlay itself, I suggest covering everything up to the clock, and leaving the rest transparent, it should do the job.

Community
  • 1
  • 1
unexpectedvalue
  • 6,079
  • 3
  • 38
  • 62
  • So just to make sure I understand. You made a transparent view that overlayed your app status bar? What was the purpose of doing that in your app, did you have some sort of visual overlay? May I ask what your app was? As for doing an overlay I hadn't thought of the touch aspect but I can see that is important! – Ben Holland May 16 '12 at 16:37
  • The relevant sample code is in the question I linked. I don't have anything more as we aren't doing anything like that anymore. The idea back then was a non-modal notification management interface, similar to what iOS5 and Android are doing. Since iOS5 it isn't needed anymore as notifications aren't modal anymore. I didn't need any visuals, just a full length transparent view on top of the status bar that intercepted touches, and just as importantly, passed them on. – unexpectedvalue May 16 '12 at 16:40
  • After spending a whole morning on this I'm pretty sure this is the way to go combined with creating the view like in http://stackoverflow.com/questions/2833724/adding-view-on-statusbar-in-iphone. But for the life of me I can't get the view to actually show up! Maybe its prevented in iOS 5? Anyway I'll give you the solution and post back later if I get it all working smoothly. – Ben Holland May 16 '12 at 18:24