HI
IM new to the iphone sdk, i have been winging it for the past week making changes on an application that has been built for me. I am having some issues here and im hoping someone can help me out
When the App is in portrait mode it is correct as below
Ok now i was struggling pretty hard here that when i called the MVmovie player it would load the movie (which it does horayy!) But I only
wanted the the movie player itself to auto rotate, not the video view above
Well after struggling with that for 2 days and having no luck whatsoever, i decided id make the whole app be autorotate compatible
So here is the shot when i have the video view in landscape
As you can see the Menu Items are crunched to the left side, so is the title etc... leaving a big black space the right of the app
is there any techniques i can use to auto center the view on landscape mode, the previous developer used all locked coords for
the portrait mode and im not sure how i can dynamically center the menu and titles
Here is the code clip
Code:
videosView=[[UIView alloc]initWithFrame:CGRectMake(0,0,kViewWidth, kViewHeight)]; //which is 420 X 380
videosView.backgroundColor=[UIColor blackColor];
self.view =videosView;
CGRect frame=CGRectMake(0, 0,1024,44); // I changed that to 1024, it was 300
imgViewTopbar=[[UIImageView alloc]initWithFrame:frame];
imgViewTopbar.image=[UIImage imageNamed:@"topBar.png"];
[self.view addSubview:imgViewTopbar];
// Here is the title
lblTitle=[[UILabel alloc]initWithFrame:CGRectMake(60,5,200,30)];
lblTitle.text=@"";
lblTitle.backgroundColor=[UIColor clearColor];
lblTitle.textColor=[UIColor whiteColor];
lblTitle.textAlignment=UITextAlignmentCenter;
lblTitle.font=[UIFont boldSystemFontOfSize:kTitleLabelFontSize];
[self.view addSubview:lblTitle];
[lblTitle release];
Well i guess you get the hint... He ued locked coords.. how to i change that to be dynamic
Im running in circles here!!
Thanks for your help
Ricky