我已在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