Add a small image to the statusbar

 

UIWindow *myWindow = [[UIWindow alloc] initWithFrame:[UIApplication sharedApplication].statusBarFrame];

[myWindow setBackgroundColor:[UIColor clearColor]];

[myWindow setWindowLevel:UIWindowLevelStatusBar];

UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(280.0f, 5.0f, 10.0f, 10.0f)];

[imageView setImage:[UIImage imageNamed:@"status.png"]];

[myWindow addSubview:imageView];

[imageView release];

[myWindow makeKeyAndVisible];

 

posted @ 2010-02-08 16:11  javawebsoa  Views(142)  Comments(0Edit  收藏  举报