I noticed that this iPhone app Reeder has a special icon on top of the battery icon. How is this done? It even does animation in that corner so 开发者_运维百科I assume you can just lay an UIView on top of the battery?
Also a side question, how do you overlay a texture on top of NavBar and the bottom Toolbar? Noticed how the bars are not exactly black, it has a texture on it.
alt text http://img689.imageshack.us/img689/1224/photofo.jpg
I would imagine that this app simply creates an UIWindow
with it's windowLevel
property set to some large value. By doing so, one can make a window appear to be part of the statusbar.
UIWindow *topWindow = [[UIWindow alloc] initWithFrame:CGRectMake(5.0f, 5.0f, 310.0f, 12.0f)];
[topWindow setBackgroundColor:[UIColor redColor]];
[topWindow setAlpha:0.5f];
[topWindow setWindowLevel:10000.0f];
[topWindow setHidden:NO];
If you use reeder and receive a modal dialog (push notification or similar) while it is updating, you will note that the little widget they put over the status bar does not get greyed out like the rest of the screen.
So my guess is have a look at UIWindow, in particular the UIWindowLevel property.
I imagine they made their own implementation of the navigation and tab bar (I know this is how Tweetie had to do it).
Reeder's website doesn't show that custom icon anywhere in their official screenshots. Are you jailbroken?
I am guessing that the programmer just made a UIImageView containing a blank status bar, then placing some UILabels above it... I'm not too sure though.
精彩评论