我已在applicationDidFinishLaunching中使用了imageview,如下所示。现在更改整个应用程序背景
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
UIImageView* imageBg = [[UIImageView alloc]initWithFrame:CGRectMake(0, 20, 320, 460)];
imageBg.image = [UIImage imageNamed:@"AppBG.png"];
[self.window addSubview:imageBg];
[self.window sendSubviewToBack:imageBg];
}
在RootViewController的我有一个按钮
我需要的是,在RootViewController的按下按钮我想将图像从AppBG.png改变AppBG1.png