天天看點

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];

ico