I have created an UIImageView and UILabel in my AppDelegate.m file to display the title image
My default orientation is in landscape mode but i am not able to display the image properly it shows like the below image
The desired result should be like this image given below
i also tried to rotate the image and label in my AppDelegate.m
file this is my code
But it dosen't display the image and title is just disappears.
- (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];
UILabel *title=[[UILabel alloc]initWithFrame:CGRectMake(50, 0, 5000, 50)];
title.text=@"Library Management System";
[title setFont:[UIFont systemFontOfSize:24]];
[title setBackgroundColor:[UIColor colorWithRed:0 green:0 blue:0 alpha:0]];
title.textColor=[UIColor redColor];
title.transform=CGAffineTransformMakeRotation(M_PI_2);
UIImageView *imageView=[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 5000, 50)];
imageView.image=[UIImage imageNamed:@"LMS.jpg"];
imageView.transform=CGAffineTransformMakeRotation(M_PI_2);
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2,viewController3,nil];
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];
[self.window addSubview:imageView];
[self.window addSubview:title];
return YES;
}