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 @   javawebsoa  Views(142)  Comments(0Edit  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示