我在 iOS 6 中创建了一个新的选项卡式应用程序,
但我想在顶部添加一个图像,以便在我的项目中保持相同
在AppDelegate.m
文件中我添加了这段代码
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
UIViewController *viewController1 = [[LMSFirstViewController alloc] initWithNibName:@"LMSFirstViewController" bundle:nil];
UIViewController *viewController2 = [[LMSSecondViewController alloc] initWithNibName:@"LMSSecondViewController" bundle:nil];
UIViewController *viewController3 = [[LMSThirdViewController alloc] initWithNibName:@"LMSThirdViewController" bundle:nil];
**UIImageView *imageView=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 80, 1024)];
imageView.image=[UIImage imageNamed:@"LMS.jpg"];**
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2,viewController3,nil];
self.window.rootViewController = self.tabBarController;
**[self.window addSubview:imageView];**
[self.window makeKeyAndVisible];
return YES;
}
但它不加载任何图像
我应该怎么做才能以任何其他方式添加图像来实现这一点
谢谢,
阿伦。