Search Results

Search found 935 results on 38 pages for 'landscape portrait'.

Page 6/38 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • UIImagePickerController in landscape on iPhone OS >= 3.2

    - by Mike
    Here is the problem. I have to open the UIImagePickerController in landscape. At this phase I am doing the app for iPhone but it will be soon adjusted for iPad. The classical way to force the UIImagePickerController to open in landscape would be to use this solution. But this solution has a problem, specially for iPad, that is the line, [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight]; because Apple rejects an application for doing that, as they don't want you to set an orientation, because if the user is holding the iPad on landscapeLeft the controller will appear upside down. Apple want you to use your paranormal powers and open the controller the right way for the user. The only problem is this: My controller is to appear when the application starts At this time, the orientation information is not yet available, because it takes a while for the device to discover its orientation; I've tried to get around this using the accelerometer to discover the orientation, but the accelerometer data is not yet available too when the app starts. I could make a routine to delay the application until the orientation is available, showing a black screen to the user in the mean time, or a beach ball, but I wonder if there's a more elegant way to do that! thanks.

    Read the article

  • UIScrollView frame size issue in Landscape Mode

    - by viper15
    I'm trying to make UIScrollView auto-resize and appear correctly in Landscape mode. Portrait mode works fine. Here's my code: - (void)viewDidLoad { [super viewDidLoad]; //=== load all the custom view NSMutableArray *controllers = [[NSMutableArray alloc] init]; int page = 0; [controllers addObject:[self loadScrollView:[[Page1ViewController alloc] initWithNibName:@"Page1ViewController" bundle:nil] withPage:page++]]; [controllers addObject:[self loadScrollView:[[Page2ViewController alloc] initWithNibName:@"Page2ViewController" bundle:nil] withPage:page++]]; [controllers addObject:[self loadScrollView:[[Page3ViewController alloc] initWithNibName:@"Page3ViewController" bundle:nil] withPage:page++]]; self.viewControllers = controllers; [controllers release]; //=== automaticaly define number of pages _numberOfPages = [self.viewControllers count]; // a page is the width of the scroll view scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; scrollView.pagingEnabled = YES; scrollView.contentSize = CGSizeMake(scrollView.frame.size.width * _numberOfPages, scrollView.frame.size.height); scrollView.showsHorizontalScrollIndicator = NO; scrollView.showsVerticalScrollIndicator = NO; scrollView.scrollsToTop = NO; scrollView.delegate = self; // First, set the number of pages pageControl.numberOfPages = _numberOfPages; pageControl.currentPage = 0; } Then, I went into each view controller nib file and set the background to different color to test if it's working. Unfortunately, when in Landscape mode, the width and height remains the same as in Portrait Mode. I'm not sure how to fix this problem. Hope anyone can help me. Many thanks in advance.

    Read the article

  • UIKeyBoard resize on orientation change to landscape

    - by Dave
    This is very rookie question. I have a UIToolBar at the bottom which is supposed to animatedly move up and down with key board when the UIKeyBoard is displayed. I got that working with the help of UIKeyBoard Notifications. The view we are talking about has split view enabled. When device orientation is landscape, both the views as columns are shown [hope that makes sense]. When key board is shown, i do this CGSize keyBoardSize = [[notificationInfo objectForKey:UIKeyboardFrameEndUserInfoKey]CGRectValue].size; CGRect toolbarFrame= [BottomToolBar frame]; toolbarFrame.origin.y -= keyBoardSize.height; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.3]; BottomToolBar .frame = viewFrame; [UIView commitAnimations]; when key board is hiiden i do this toolbarFrame.origin.y += keyBoardSize.height; My Problem is when device orientation changes to landscape, when the key board is visible the bottom tool bar is gone. I see it move up quickly. I am not sure how to fix this. Can anyone help please? Also, is there a way to NOT make the key board span across both the views in the split view?

    Read the article

  • How to remove a "green screen" portrait background

    - by danbystrom
    I'm looking for a way to automatically remove (=make transparent) a "green screen" portrait background from a lot of pictures. My own attempts this far have been... ehum... less successful. I'm looking around for any hints or solutions or papers on the subject. Commercial solutions are just fine, too. And before you comment and say that it is impossible to do this automatically: no it isn't. There actually exists a company which offers exactly this service, and if I fail to come up with a different solution we're going to use them. The problem is that they guard their algorithm with their lives, and therefore won't sell/license their software. Instead we have to FTP all pictures to them where the processing is done and then we FTP the result back home. (And no, they don't have an underpaid staff hidden away in the Philippines which handles this manually, since we're talking several thousand pictures a day...) However, this approach limits its usefulness for several reasons. So I'd really like a solution where this could be done instantly while being offline from the internet.

    Read the article

  • Leftover Nav Bar in Landscape View

    - by Rob Bonner
    Hello, I am working to force a view into landscape mode, and have picked up all kinds of cool tips to make this happen, but am stuck on one item that is left on the screen. I have my XIB file laid out in landscape, and in my code I create the view controller normally: RedeemViewController *aViewController = [[RedeemViewController alloc] initWithNibName:@"RedeemViewController" bundle:nil]; aViewController.hidesBottomBarWhenPushed = YES; aViewController.wantsFullScreenLayout = YES; [[self navigationController] pushViewController:aViewController animated:YES]; Inside the controller viewDidLoad I complete the following: [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight]; [[self navigationController] setNavigationBarHidden:YES animated:YES]; [UIView beginAnimations:@"View Flip" context:nil]; [UIView setAnimationDuration:.75]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; if (self.interfaceOrientation == UIInterfaceOrientationPortrait) { self.view.transform = CGAffineTransformIdentity; self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(90)); self.view.bounds = CGRectMake(0.0, 0.0, 480, 320); } [UIView commitAnimations]; What I end up with is a perfectly rotated view, with a grey vertical bar on the left side (see pic). So to the question, how do I get rid of the bar? Edit: I am pretty sure this is the navigation bar that is not being hidden. This is a duplicate of another post, with some modified code, the other question was being answered with the bug.

    Read the article

  • iphone: re-sizing gradient after shift from portrait to landscape

    - by d_CFO
    In viewDidLoad, I can create a gradient with no problem: CAGradientLayer *blueGradient = [[CAGradientLayer layer] retain]; blueGradient.frame = CGRectMake(gradientStartX,gradientStartY,gradientWidth,gradientHeight); where gradientWith is device-defined as 320 or 1024 as appropriate. What I can’t do is resize it inside willRotateToInterfaceOrientation: -– and thus get rid of that empty black space off to the right -- after the user changes to landscape mode. (The nav bar and tab bar behave nicely.) (1) Recalibrating the gradient’s new dimensions according to the new mid-point, (2) using kCALayerMaxXMargin, and (3) employing bounds all looked like they would do the job. bounds looked a litte more intuitive, so I tried that. I don’t want to admit that I have made zero progress. I will say that I’ve been reduced to the brute force method of trying every permutation of self, view, layer, bounds, blueGradient, and CGRect(gradientStartX,gradientStartY,newGradientWidth,newGradientHeight) with zero success. This is not difficult. My lack of understanding is making it difficult. Anyone out there “Been there, done that”?

    Read the article

  • Portrait video to landscape

    - by dappa
    I am aware questions like this one may already be out there but for the sake of others like me I will go ahead and ask I have a app that is set to only allow portrait orientation but this setting affects my videos as I would like only the videos to be able to play in landscape also. Is there a method I can add unto my .m file to make this work? Here is my code; #import "BIDVideosViewController.h" @interface BIDVideosViewController () @end @implementation BIDVideosViewController @synthesize moviePlayer ; @synthesize tableList; - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization } return self; } - (void)viewDidLoad { [super viewDidLoad]; UITableView *table = [[UITableView alloc]initWithFrame:self.view.bounds]; [table setDelegate:self]; [table setDataSource:self]; [self.view addSubview:table]; tableList = [[NSMutableArray alloc] initWithObjects:@"Gangan",@"SwimGood",@"German Ice", nil]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [tableList count]; } -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *DisclosureButtonIdentifier = @"DisclosurebutotonIdentifier"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:DisclosureButtonIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:DisclosureButtonIdentifier]; } NSInteger row = [indexPath row]; NSString *rowString = [tableList objectAtIndex:row]; cell.textLabel.text = rowString; return cell; } -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { { NSBundle *str = [tableList objectAtIndex:indexPath.row]; if ([str isEqual:@"Gangan"]) { NSBundle *bundle = [NSBundle mainBundle]; NSString *thePath = [bundle pathForResource:@"Gangan" ofType:@"mp4"]; NSURL *theurl = [NSURL fileURLWithPath:thePath]; moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:theurl]; [moviePlayer setMovieSourceType:MPMovieSourceTypeFile]; [self.view addSubview:moviePlayer.view]; [moviePlayer setFullscreen:YES]; [moviePlayer play]; } else if ([str isEqual:@"SwimGood"]) { NSBundle *bundle = [NSBundle mainBundle]; NSString *thePath = [bundle pathForResource:@"SwimGood" ofType:@"mp4"]; NSURL *theurl = [NSURL fileURLWithPath:thePath]; moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:theurl]; [moviePlayer setMovieSourceType:MPMovieSourceTypeFile]; [self.view addSubview:moviePlayer.view]; [moviePlayer setFullscreen:YES]; [moviePlayer play]; } else if ([str isEqual:@"German Ice"]) { NSBundle *bundle = [NSBundle mainBundle]; NSString *thePath = [bundle pathForResource:@"German Ice" ofType:@"mp4"]; NSURL *theurl = [NSURL fileURLWithPath:thePath]; moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:theurl]; [moviePlayer setMovieSourceType:MPMovieSourceTypeFile]; [self.view addSubview:moviePlayer.view]; [moviePlayer setFullscreen:YES]; [moviePlayer play]; } } } @end

    Read the article

  • UIButton Origin and Device Orientation

    - by Ward
    Hey there, I might be crazy, but for some reason this problem is stumping me. I have a view controller that is set to auto rotate to orientation. Inside I've got two subviews. One is a uibutton. All I want is for my button's origin to stay locked to the bottom-left in portrait and bottom-right in landscape (so it basically stays in the same place). It should also stay in place for portrait upside down and landscape right. Any ideas? Thanks, Howie

    Read the article

  • iPad launch orientation

    - by Brian
    After reading many posts, I still haven't got a clue how to solve this problem... The first view of my app is a tableViewController. I override (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation and it always returns YES. If I hold my iPad upright under landscape orientation, it rotates right after I launch the app. However, if I put my iPad flat on the table, even though my homepage is in landscape orientation, it launches in protrait orientation. So I guess the problem is, how can I get the orientation of my homepage and launch my app with that orientation?

    Read the article

  • UIModalPresentationFormSheet on iPad in landscape mode

    - by Ivan
    I created a UIViewController view from XIB with modalPresentationStyle set to UIModalPresentationFormSheet and everything works great in portrait mode. When I switch to landscape the view gets moved upperleft (it's not centered as it should be) and most part of it is clipped. Any ideas why this is happening and how to solve it? Thanks

    Read the article

  • iAds on landscape

    - by Carlos Vargas
    Hey guys Im having trouble with iAds in landscape mode This is part of my code: banner = [[ADBannerView alloc]init] ; banner.currentContentSizeIdentifier = ADBannerContentSizeIdentifier480x32; [self.view addSubview:banner]; [banner release]; But is not working for me, it gives me error, gives me a SIGABRT error in the second line of the code. I am not having problems with the portrait mode... please help. Best Regards Carlos Vargas

    Read the article

  • Hello-World-grade landscape Android app fails to start (complete code included)

    - by WingedCat
    I'm trying to develop a simple Android app, fixed in landscape mode. I am using Eclipse 1.3, compiling for Android SDK version 7 (OS version 2.1). When I try to run it in the emulator, it crashes on boot. (It gets as far as the unlock slider, but shortly after that when trying to launch the application itself, I get "The application Failtest (process com.wcs.failtest) has stopped unexpectedly. Please try again.".) Here is main.xml (with the tags escaped so this displays properly): <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="480px" android:layout_height="320px" > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="96px" android:layout_height="320px" android:id="@+id/action_menu" > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="96px" android:layout_height="48px" > <Button android:layout_width="48px" android:layout_height="48px" android:background="#f00" android:id="@+id/action_button_11" /> </LinearLayout> </LinearLayout> </LinearLayout> Here is AndroidManifest.xml (again with the tags escaped so this displays properly): <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.wcs.failtest" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen"> <activity android:name=".FailtestActivity" android:screenOrientation="landscape" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> <uses-sdk android:minSdkVersion="7" /> </manifest> And here is FailtestActivity.java: package com.wcs.failtest; import android.app.Activity; import android.os.Bundle; import android.widget.Button; import android.view.View.OnClickListener; import android.view.View; public class FailtestActivity extends Activity { private OnClickListener action11Listener = new OnClickListener() { public void onClick(View v) { } }; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Button button; button = (Button)findViewById(R.id.action_button_11); button.setOnClickListener(action11Listener); setContentView(R.layout.main); } } I suspect it is something simple I'm overlooking. What is it?

    Read the article

  • Print a HTML page in landscape mode?

    - by yoz1k
    Is it possible to print a simple page in landscape mode? (without the need for the user to go to printer settings?) <!DOCTYPE html> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <style type="text/css" media="print"/> @page { size: landscape; margin: 2cm; } body { color: red; } </style> <style type="text/css" media="all" > body { font-size: 10pt; font-family: Arial; } table td { padding: 2em; } </style> </head> <body> <table> <tr> <td>a</td><td>b</td><td>c</td><td>d</td><td>e</td><td>f</td><td>g</td><td>h</td><td>i</td><td>j</td><td>k</td><td>l</td><td>m</td><td>n</td><td>o</td><td>p</td><td>q</td><td>r</td><td>s</td><td>t</td><td>u</td><td>v</td><td>w</td><td>x</td><td>y</td><td>z</td> </tr> <tr> <td>a</td><td>b</td><td>c</td><td>d</td><td>e</td><td>f</td><td>g</td><td>h</td><td>i</td><td>j</td><td>k</td><td>l</td><td>m</td><td>n</td><td>o</td><td>p</td><td>q</td><td>r</td><td>s</td><td>t</td><td>u</td><td>v</td><td>w</td><td>x</td><td>y</td><td>z</td> </tr> <tr> <td>a</td><td>b</td><td>c</td><td>d</td><td>e</td><td>f</td><td>g</td><td>h</td><td>i</td><td>j</td><td>k</td><td>l</td><td>m</td><td>n</td><td>o</td><td>p</td><td>q</td><td>r</td><td>s</td><td>t</td><td>u</td><td>v</td><td>w</td><td>x</td><td>y</td><td>z</td> </tr> <tr> <td>a</td><td>b</td><td>c</td><td>d</td><td>e</td><td>f</td><td>g</td><td>h</td><td>i</td><td>j</td><td>k</td><td>l</td><td>m</td><td>n</td><td>o</td><td>p</td><td>q</td><td>r</td><td>s</td><td>t</td><td>u</td><td>v</td><td>w</td><td>x</td><td>y</td><td>z</td> </tr> <tr> <td>a</td><td>b</td><td>c</td><td>d</td><td>e</td><td>f</td><td>g</td><td>h</td><td>i</td><td>j</td><td>k</td><td>l</td><td>m</td><td>n</td><td>o</td><td>p</td><td>q</td><td>r</td><td>s</td><td>t</td><td>u</td><td>v</td><td>w</td><td>x</td><td>y</td><td>z</td> </tr> <tr> <td>a</td><td>b</td><td>c</td><td>d</td><td>e</td><td>f</td><td>g</td><td>h</td><td>i</td><td>j</td><td>k</td><td>l</td><td>m</td><td>n</td><td>o</td><td>p</td><td>q</td><td>r</td><td>s</td><td>t</td><td>u</td><td>v</td><td>w</td><td>x</td><td>y</td><td>z</td> </tr> </table> </body> </html> the solution @page size: landscape didn't help. any ideas?

    Read the article

  • UINavigationController back button half works in iPad landscape orientation

    - by drawnonward
    In an iPad application with a UINavigationController, everything works in portrait mode but in landscape mode the back button sometimes only goes back half a level. That is to say, on the first press the title bar animates as if it was popping a controller, and on the second press it animates the content popping. Has anyone found a solution to this? The contradictory solution in this question did not help. I have a shouldAutorotate method in the navigation controller but no others. -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)inOrientation { return YES; }

    Read the article

  • android soft keyboard covers editText in landscape

    - by gabi
    I have the following layout: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:layout_height="wrap_content" android:layout_width="fill_parent" android:orientation="vertical" android:layout_above="@+id/edittext"> <TextView android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="line1"/> <TextView android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="line2"/> <TextView android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="line3"/> </LinearLayout> <EditText android:id="@id/edittext" android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_margin="5dp" android:text="test" android:layout_alignParentBottom="true" android:imeOptions="flagNoExtractUi" /> </RelativeLayout> and in landscape on a Nexus one it looks like: Is there a way to fix this, but keep flag flagNoExtractUi ?

    Read the article

  • Inactive area after device rotation

    - by Sébastien
    Hi all, I don't understand what's wrong in my very simple application with device rotation : I built my view with interface builder. (See screen capture here) I specified <key>UIInterfaceOrientation</key><string>UIInterfaceOrientationLandscapeRight</string> in my info.plist file. I had a (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {return YES;} in my root view controller. The area on the left (shown in red on the capture), around 20 pixel width, keeps inactive (nothing append if I hit a button in this area). In fact the full screen is active only in portrait mode, in landscape right mode there is this 20 pixels width inactive area, in landscape left mode this inactive area is on the right, in portrait upside down mode this area is on the bottom. I read lots of posts and documentation about UIView rotation, but I did not find anything to solve this problem (I tried to play with view.frame and view.bounds without any success). Anybody has an idea ? Thanks a lot. Regards. Sébastien.

    Read the article

  • PresentModalViewController from within UISplitViewController: weird behavior in landscape mode

    - by Krumelur
    Hi, I've been using PresentModalViewController a lot and never had any issues. But when showing a modal controller from within any controller hosted by a UISplitViewController I get strange orientation bugs. In my table view (which is root controller of the UISplitView), when a cell is touched, I call: MyController oModal = new MyController(); oModal.ModalPresentationStyle = UIModalPresentationStyle.FormSheet; oModal.ModalTransitionStyle = UIModalTransitionStyle.CrossDissolve; this.PresentModalViewControll(oModal, true); If the iPad is in Portrait, all is okay. If it is in landscape however, the modal controller fades in but its orientation is incorrect. Then, after fading in has finished, it suddenly flips 90 degrees and adjusts to correct orientation. I have overriden ShouldAutoRotateToInterfaceOrientation(), so that cannot be it. Ideas? René

    Read the article

  • UIViewAnimationTransitionCurlUp in landscape mode transitioning right-to-left

    - by Thanos
    I have a view controller that is showing in portrait mode. When you touch the "menu" button, it calls the code below and it flips up to the MainMenu controller. So far, so good. - (void) menuButton: (id) sender { MainMenu_ViewController * viewController = [[MainMenu_ViewController alloc] initWithNibName:@"MainMenu_ViewController" bundle:nil]; self.menuView = viewController.view; self.menuView.frame = self.view.bounds; [viewController release]; [UIView beginAnimations:nil context: nil]; [UIView setAnimationDuration: 1.0]; [UIView setAnimationTransition: UIViewAnimationTransitionCurlUp forView: self.view cache: YES]; [self.view addSubview: self.menuView]; [UIView commitAnimations]; } However, when you do the same in landscape mode, instead of the animation flipping up (with respect to gravity, i.e. towards the long end of the iPhone) it flips towards the left (i.e. towards the short end of the iPhone). Is this a limitation of the animation, or am I missing something?

    Read the article

  • Touch coordinates in iPhone landscape mode app

    - by gok
    I am trying to make this landscape only iphone app. I only use this code for this purpose: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationLandscapeRight); } However when I click clip subviews checkbox from interface builder, the view is clipped from the middle. I also don't receive any touch events from outside of view bounds obviously. - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { CGPoint fingerPos = [[touches anyObject] locationInView:self.view]; NSLog(@"%f %f",fingerPos.x,fingerPos.y); } only prints for coordinates between 20 and 320 for X. But Y works fine. When i try to modify bounds by hand, everything works fine; View is positioned and shown correctly, printed coordinates are correct, I receive touch from all of the screen except between 0 and 20 for X. So Left side of the screen is unresponsive to touch events for only 20 pixels. Code I use to modify bounds: self.view.bounds = CGRectMake(-180.0f, 0.0f, 680.0f, 480.0f); What might be causing this? Weird!

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >