开发者

How to change the space used by the battery icon on the iPhone?

开发者 https://www.devze.com 2022-12-19 18:42 出处:网络
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 to

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号