Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- iOS interface orientation always says portrait
- - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
- {
- // Overriden to allow any orientation.
- return YES;
- }
- - (void)setArticleRenderView:(UIView *)view
- {
- CGRect frame;
- if(self.interfaceOrientation == UIInterfaceOrientationPortrait)
- {
- NSLog(@"Iam in portrait");
- }
- if(UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation]))
- {
- NSLog(@"Portrait");
- }
- if(UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation]))
- frame = CGRectMake(0, 44, 768, 960);
- else
- frame = CGRectMake(0, 44, 703, 704);
- view.frame = frame;
- [self.view addSubview:view];
- NSLog(@"%f x %f", view.frame.size.width, view.frame.size.height);
- NSLog(@"%f x %f", view.frame.origin.x, view.frame.origin.y);
- }
Add Comment
Please, Sign In to add comment