Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

thevibesman

macrumors regular
Original poster
Oct 26, 2007
139
0
Is it possible to detect touch events on the status bar like the double-tap action in safari? The best lead I got from googling was that the object for the statusbar is private so maybe not legit to use. My attempts to expand views into the status bar area so far haven't worked. Any ideas?
 

jouni

macrumors newbie
Dec 23, 2008
1
0
I was wondering this recently too. Either there are some notifications for it, or then maybe you could get around it somehow. I noticed that if you have UITextView on your view, the statusbar is detected as a tap/scroll to the begining of the view. Add UITextView and detect it's scroll..? just small workaround and should be "App Store" safe if you think it as just using published UITextView API.
 

thevibesman

macrumors regular
Original poster
Oct 26, 2007
139
0
I read about that UITextView solution, but that won't work for me. I am hoping to get touch location information so I can split the status bar up into 3 or 4 sections to make multiple hidden buttons out of the status bar.
 

TuffLuffJimmy

macrumors G3
Apr 6, 2007
9,032
160
Portland, OR
I'm no programmer, but wouldn't it be possible to just make invisible buttons that are right next to the status bar? Since the status bar is so small the user would hit the buttons anyway.
 

thevibesman

macrumors regular
Original poster
Oct 26, 2007
139
0
Basically, I'm designing some apps that need every pixel of space available on the screen for tracking touches (the multiple buttons on the status bar is just one example). I don't want to hide the status bar because I'd still like to show the cell, WiFi, and battery status to the user but without sacrificing any of my possible touch areas. Since I am not trying to emulate existing statusbar touch uses, faking it in any way really won't do the trick for me because I really would like to have specific UITouches delivered when the user touches those top 20 pixels.
 

liptonlover

macrumors 6502a
Mar 13, 2008
989
0
Apple allows access to all the information in the status bar, so you could hide the status bar, simulate it by redrawing everything yourself as separate items, then put your invisible buttons there. That way you could customize the status bar to fit the theme of your app too if you want.
 

thevibesman

macrumors regular
Original poster
Oct 26, 2007
139
0
Apple allows access to all the information in the status bar, so you could hide the status bar, simulate it by redrawing everything yourself as separate items, then put your invisible buttons there. That way you could customize the status bar to fit the theme of your app too if you want.


Really? That would be ideal because then I wouldn't need to waste space with the status bar at all and could just show battery/connectivity (no need for time and perhaps I could even streamline those graphics more.

I couldn't find anything in the documentation related to this, care to point out which class reference I need to check out?
 

liptonlover

macrumors 6502a
Mar 13, 2008
989
0
I think I mis-worded what I said, I made it a tad too definite. I have seen apps that tell you the time, and others with wifi data. But I haven't looked for(or seen) any official classes. Sorry if I ended up misleading you. They may be there, but I haven't seen them myself.
 

thevibesman

macrumors regular
Original poster
Oct 26, 2007
139
0
The phone obviously has functions/methods to call to get this info to display it in the status bar, but from searching around it seems like Apple doesn't allow it (i.e. private APIs) from everything I've read on the developer site.

I too have seen apps that can tell WiFi network strength and battery status (time doesn't really count, that is easy is every software environment I've ever dealt with) and am a little confused by this because all official word seems to say this isn't supported. I found some references to private frameworks on code.google.com to help with WiFi related info. So what do you guys think, are these WiFi/battery status apps breaking rules in the use of private APIs and somehow Apple didn't notice during the approval process or do you think there is some undocumented work around that Apple considers legit yet unsupported? I'd really like to be able to handle battery, WiFi, and cell info in my own way in some of my apps but am a little nervous about wasting much more time pursuing a solution to have Apple tell me I can't do it when I submit my app.
 

liptonlover

macrumors 6502a
Mar 13, 2008
989
0
I don't think apple will mind as long as the overall scheme is within limits. A way to possibly be safer, however, is to simply duplicate exactly one of the existing styles except for of course the buttons.
 

thevibesman

macrumors regular
Original poster
Oct 26, 2007
139
0
Look and feel is not the issue. As far as I can figure out the only way to get this information is via private APIs which as I understand would be a violation of the SDK agreement and not be allowed on the store. So it is a question of code, not interface, but are the applications that are accessing WiFi/cell/battery info somehow getting under Apple's radar re: the use of private APIs, or is there a legit way to CODE this.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.