Search Results

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

Page 9/38 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • How to check in which position (landscape or portrait) os the iPhone now?

    - by Knodel
    I have an app with a tab bar, and nav controllers in each tab. When user shakes the device, a UIImageView appears as a child view in the nav controller. But the UIImageView must contain a special image, depending on the device's current orientation. If I write just - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation) if (interfaceOrientation == UIInterfaceOrientationPortrait|| interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) { //Code } else if (interfaceOrientation == UIInterfaceOrientationLandscapeRight||interfaceOrientation == UIInterfaceOrientationLandscapeLeft) { //Code } } The view just goes crazy if user rotated the device before shaking. Is there a method to get iPhones current orientation?

    Read the article

  • Which are the most important media queries to use in creating mobile responsive design?

    - by Matt
    There are a lot different media queries for mobile screen sizes. It can be overwhelming to accomodate all of them when designing a responsive mobile site. Which are the most important ones to use when designing for mobile? I found this article that does a pretty good job of outlining the available media queries: http://css-tricks.com/snippets/css/media-queries-for-standard-devices/. /* Smartphones (portrait and landscape) ----------- */ @media only screen and (min-device-width : 320px) and (max-device-width : 480px) { /* Styles */ } /* Smartphones (landscape) ----------- */ @media only screen and (min-width : 321px) { /* Styles */ } /* Smartphones (portrait) ----------- */ @media only screen and (max-width : 320px) { /* Styles */ } /* iPads (portrait and landscape) ----------- */ @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) { /* Styles */ } /* iPads (landscape) ----------- */ @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) { /* Styles */ } /* iPads (portrait) ----------- */ @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) { /* Styles */ } /* Desktops and laptops ----------- */ @media only screen and (min-width : 1224px) { /* Styles */ } /* Large screens ----------- */ @media only screen and (min-width : 1824px) { /* Styles */ } /* iPhone 4 ----------- */ @media only screen and (-webkit-min-device-pixel-ratio : 1.5), only screen and (min-device-pixel-ratio : 1.5) { /* Styles */ }

    Read the article

  • why does the gingerbread emulator orientation gets stuck in apps?

    - by tabjsina
    At first I thought this was a problem with my app, but it seems to be happening in any app (though interestingly, not the home screen) in the gingerbread emulator. To replicate my issue, open eclipse and fire up the android emulator for gingerbread (I'm using the "Google APIs - API Level 9" as my target) So the procedure to duplicate once the emulator loads is press LCtrl-F11 to shift orientation to landscape, then again to switch to portrait Result: In the homescreen: The view rotates to landscape, and then back to portrait, as expected In any app (i've tried browser, calculator, maps, and the app i'm currently working on): the view rotates to landscape, and then nothing, it stays in landscape even the emulator is displaying the phone in landscape mode (see below) http://i54.tinypic.com/2ake06v.jpg Has anyone else had this issue, or have I installed the emulator in some incorrect way - this hasn't been an issue with any of the previous emulators

    Read the article

  • shouldAutorotateToInterfaceOrientation called several times in a row without any rotation

    - by Mike
    I am trying to implement some interface changes in my app, based on the device rotation. My app is a view based app. So, its main view controller has a didload method. The app starts in portrait. Almost all changes on the device orientation triggers the shouldAutorotateToInterfaceOrientation method but this method is not called when the device is put on portrait, after coming from any landscape orientation. While debugging the app, I have put a NSLog(@"orientation=%d", interfaceOrientation); on my shouldAutorotateToInterfaceOrientation method, and what I see is quite strange: When I run the app, shouldAutorotateToInterfaceOrientation is called 6 times before the app's interface even appears. Every time it runs, it reports a different number for the orientation: the order it reports on console is: portrait, portrait, portrait, landscape right, landscape left, upside down) (????). During this time the app is just beginning. All 6 times the debugger reports the method being run by the app's delegate. So, here comes the questions: WHy shouldAutorotateToInterfaceOrientation is not being called when the device enters on portrait? Why is this method running 6 times called by the delegate even before the app starts and shows its interface if no rotation is being done? thanks.

    Read the article

  • Problem after dismissing a modal view used in conjunction with a uisplitviewcontroller

    - by user336274
    I'm having a hard time understanding why the following is happening (and how to fix it). I've created an application using the split-view based application. I've added a UiBarButtonItem called showTheModal which calls this method found in RootViewController.m: - (IBAction)showTheModal:(id)sender { theModalController.modalPresentationStyle = UIModalPresentationFullScreen; theModalController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; [self presentModalViewController:theModalController animated:YES]; if ([detailViewController popoverController] != nil) [[detailViewController popoverController] dismissPopoverAnimated:YES]; The BarButtonItem of course, is shown at the bottom of the Default Root Controller (left side of the of the split view in landscape) or at the bottom of the popup (if in landscape). The modal view is dismissed by a button placed in a toolbar. It calls the following: [self dismissModalViewControllerAnimated: YES]; The problem I'm having is if rotate the screen, while the modal is up. Here is what happens in different scenarios (start refers to the orientation when the showTheModal button is hit, end refers to the orientation when I hit the dismissModal button). 1)Start landscape, end landscape: Everything appears fine. willHideViewController and willShowViewController methods are not called in the RootViewController (as expected) 2) Start landscape, end portrait: UI appears fine. willHideViewController is run TWICE (WHY?) 3) Start portrait, end portrait: UI appears fine. willHideViewController is run once (as expected) 4) Start portrait, end landscape: The 'Root List' button remains in the detail view (right side of the split view. Neither willHideViewController and willShowViewController are invoked (WHY??) Any thoughts as to why #2 and #4 don't behave quite the expected way?

    Read the article

  • Is it bad SEO to embed an img tag in the middle of a sentence?

    - by Offlein
    I recently received a web mockup that included a sidebar with a short paragraph of narrow text; a quote from a person. At the end of the quote, the mockup had a circular portrait of the person floated to the right, hanging off the edge of the block, with the text flowing around the edge of it. It looked like this, where "TEXT" is the text, and "o" is the portrait TEXTTEXTTEXTTEXTTEX TEXTTEXTTEXTTE TEXTTEXTTEXT ooooo TEXTTEXTTEXT ooooooo TEXTTEXTTEXT ooooooo ooooo The easiest way to do this would be to put the tag for the portrait somewhere in the markup of the text, and float it right. But the HTML will look like, in that case: TEXTTEXTTE<img src="..." style="float: right;">XTTEXTTEXT and I fear this would be bad for SEO. Does anyone know? The other option is putting the at the end, absolutely positioning it, and using manual line breaks -- which sucks for my responsive design.

    Read the article

  • UIToolBar and iPhone Interface Orientation Problem

    - by Leo
    I am developing an application in iPhone. One view support orientation in portrait and landscape. I have two separate views for both orientation. This view has a UIToolbar at the top. Problem is when I change view back from landscape to portrait, UIToolbar at the top disappears. I want toolbar to come back in its original position when it is rotated back to portrait. This is what I am doing in my program. - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation duration:(NSTimeInterval)duration { if (interfaceOrientation == UIInterfaceOrientationPortrait) { self.view = self.portrait; self.view.transform = CGAffineTransformIdentity; self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(0)); self.view.bounds = CGRectMake(0.0, 0.0, 300.0, 480.0); } else if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) { self.view = self.landscape; self.view.transform = CGAffineTransformIdentity; self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(-90)); self.view.bounds = CGRectMake(0.0, 0.0, 460.0, 320.0); } else if (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) { self.view = self.portrait; self.view.transform = CGAffineTransformIdentity; self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(180)); self.view.bounds = CGRectMake(0.0, 0.0, 300.0, 480.0); } else if (interfaceOrientation == UIInterfaceOrientationLandscapeRight) { self.view = self.landscape; self.view.transform = CGAffineTransformIdentity; self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(90)); self.view.bounds = CGRectMake(0.0, 0.0, 460.0, 320.0); } } I don't know what am I missing here? Any help would be really appreciated.

    Read the article

  • How to handle iPad Modal View rotation

    - by Farha Ansari
    Hi, I have 2 views, each for portrait and landscape. I start by displaying the portrait view. On both the views, I have a button, which presents a modal view on clicking it. When the modal view comes up and then I rotate the iPad, the portrait view is replaced by the landscape view, but the modal view goes behind this view. Any idea how to bring the modal view again to the front after the rotation? Thanks for the help Farha

    Read the article

  • iphone - presenting an alertview with the right orientation

    - by Mike
    I have to present an alertview when my app starts. My app supports both landscape modes. Despite the landscape mode the device is when the app starts the alertview always shows in portrait. I have tried to use the accelerometer to detect the interface orientation before the orientation notification and I have the correct orientation 2 seconds before the alertview showing. Then, I use this code to set the status bar to a different orientation, hoping the alertview will follow... [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight]; or left, depending on the landscape mode. Nothing works. Is there a way to force the alertview to respect the orientation? The point here is this: I cannot set one landscape orientation in particular for the status bar, I have to detect the orientation the device is on and then set the status bar orientation. thanks for any help.

    Read the article

  • How to set the content size according to the size of UINavigation bar

    - by Deepika
    Hi all I am resizing the navigation bar when my application switches into landscape orientation. But i am not able to set the content size of navigation bar according to its height. Landscape image :- In this image the top left bar item and title of navigation bar are not resizing when it switches into landscape orientation....they should get re sized according to height of navigation bar. Please suggest me any idea for it? Thanks Deepika

    Read the article

  • UISplitViewController Cannot Change the Master View Controller?

    - by Nex
    I am trying to change the master view controller (that appears in the popover in portrait, and on the left side in landscape) in a UISplitViewController. I'd like to switch between the master view controller being one of two different UIViewControllers (depending on an action taken elsewhere in my application). I am using the following: mySplitViewController.viewControllers = [NSArray arrayWithObjects:newMasterController, detailController, nil]; This correctly changes the master viewcontroller as you would expect in landscape mode. However it does not seem to change the viewcontroller used for the popover in portrait mode. I notice that the barbuttonitem to show this master view controller is just calling showMasterInPopover: on the splitviewcontroller, and so would expect it to work in portrait mode as well, but it does not. In fact, I can set the master view controller, see the new viewController correctly in landscape mode, rotate back to portrait, and the viewcontroller used in the popover is still the old one. Is this a bug?

    Read the article

  • iPhone status bar orientation with opengl

    - by sfider
    I have opengl only view that displays in portrait and landscape mode using projection matrix (view's transformation is identity all the time). I need to show status bar with proper orientation. I do this by setting status bar orientation property in UIApplication and changing frame of opengl view so the view won't go under status bar. When I change from landscape to portrait (landscape is the initial state) view's frame is set to (0, 20, 320, 460) and stays like this. However view appears to be translated by (-10, -10). It seems that I did change the size of view but couldn't move it. Weird things are: initialy view is full screen, I change it to (0, 0, 300, 480) (landscape with status bar) and it works then, it doesn't work when I try to chenge it for the second time (portrait with status bar) frame property of the view shows that view is placed correctly Any thoughts on what can by the problem?

    Read the article

  • Auto screen rotation in windows 7 mobile

    - by Nagaraj
    We have developed a application for HTC HD2 mobile, which has windows 7 CE. I have designed application to work for both the orientation (portrait, landscape) Now I wanted to achieve auto screen rotation (portrait to landscape and landscape to portrait) according to the device movement (some thing like iPhone). Can i able to achieve it? if yes how can I? It will be appreciable if you provide me link or sample code.

    Read the article

  • did you know some good web site about 'iphone css layouts' ,and can you help me to improve my code..

    - by zjm1126
    i want to create a webpage on iphone , but i can't complete it in a simple way, this is my code: <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=5.0,user-scalable=yes"> </head> <body onorientationchange="updateOrientation();" onload=updateOrientation()> <div id="a"> <input id='ab' type="button" value="button" /> </div> <div id=b style="display: none">sssadwq dwqdqw</div> <style type="text/css"> *{ margin:0; padding:0; } /* Reposition on orientation change */ body.landscape{ height: 268px; } body.landscape #a{ height:134px; line-height:134px; } body.landscape #b{ height:114px; width:470px; } body{ height: 416px; } #a{ line-height:208px; height:208px; text-align:center; } #b{ height:198px; width:310px; background:red; border:5px solid black; } </style> <script src="jquery-1.4.2.js" type="text/javascript"></script> <script type="text/javascript"> function updateOrientation() { var orientation = window.orientation; switch (orientation) { // If we're horizontal case 90: case -90: // Set orient to landscape $(document.body).addClass("landscape"); break; // If we're vertical default: // Set orient to portrait $(document.body).removeClass("landscape"); break; } } $('#ab').click(function(){ if($('#b').css('display')=='none')$('#b').css('display','block') else $('#b').css('display','none') }) </script> </body> </html> it use much more fixed number,this is not the best way ,i think the best way is to use the percentage more and more, can you do it fo me ,, thanks

    Read the article

  • Force orientation change in testcase with fragments

    - by user1202032
    I have an Android test project in which I wish to programatically change the orientation. My test: public class MainActivityLandscapeTest extends ActivityInstrumentationTestCase2<MainActivity> { public MainActivityLandscapeTest() { super(MainActivity.class); } private MainActivity mActivity; private Fragment mDetailFragment; private Fragment mListFragment; private Solo mSolo; @Override protected void setUp() throws Exception { super.setUp(); mSolo = new Solo(getInstrumentation(), getActivity()); mSolo.setActivityOrientation(Solo.LANDSCAPE); mActivity = getActivity(); mListFragment = (Fragment) mActivity.getSupportFragmentManager() .findFragmentById(R.id.listFragment); mDetailFragment = (Fragment) mActivity.getSupportFragmentManager() .findFragmentById(R.id.detailFragment); } public void testPreConditions() { assertTrue(mActivity != null); assertTrue(mSolo != null); assertTrue(mListFragment != null); assertTrue(getActivity().getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE); } /** * Only show detailFragment in landscape mode */ public void testOrientation() { assertTrue(mListFragment.isVisible()); assertTrue(mDetailFragment.isVisible()); } } The layouts for the activity is in seperate folders, layout-port and layout-land layout-port fragment_main.xml layout-land fragment_main.xml In landscape mode, the layout contains 2 fragments (Detail and list) while in portrait it contains 1(List only). If the device/emulator is already in landscape mode before testing begins, this test passes. If in portrait, it fails with a NullPointerException on mListFragment and mDetailFragment. Adding a delay (waitForIdleSync() and/or waitForActivity()) did NOT seem to solve my problem. How do i force the orientation to landscape in my test, while still being able to find the fragments using findFragmentById()?

    Read the article

  • Windows Mobile 6.x How to explicitly lock the app in one orientation?

    - by Stuart
    I'm trying to get an app on the WinMo App Store. As part of this, Microsoft App's Store has asked that I need to support landscape as well as portrait. What they've said is OK is: If dynamic switching is implicitly allowed, the app will be tested just as if it supports both portrait and landscape even if only a portrait or landscape resolution is checked. You may explicitly lock the app in one orientation (which means portrait mode if the app does not handle landscape mode functions), provided the default OS orientation is preserved once the app exits. I'd love to do answer 2 - but I can't find any way of doing it - and they won't provide me any other clues - they suggested I ask on the forums... so here I am on Stack Overflow - far better than on the forums :) Anyone got any suggestions?

    Read the article

  • How to detect image orientation (text)

    - by Maciej
    My program is working with fax documents stored as separate bitmaps I wonder if there is a way to detect automatically page orientation (vertical or horizontal) to show image preview for user in right order (meant rotate if neccesary) Any advices much appreciated! EDIT: Clarification: When Faxmachine receives multi-page document it saves each page as separate TIFF file. My app has built-in viewer displaying those files. All files are scaled to A4 format and saved in TIFF (so there is no change to detect orientation by height/width parameters) My viewer displays images in portrait mode by default What I'd like to do is automagically detect situation when org document was printed in landscape mode (eg wide Excel tables) then I'd like to show rotated preview for end user to speed up preview process Obviously there are 4 possible fax orientation portrait / landscape x 2 kind of rotations. I'm even interested simplified solution detecting when org doc was landscape or portrait (I've noticed most of landscape docs needs to be rotated clockwise)

    Read the article

  • how to rotate to current of Orientation?

    - by RAGOpoR
    according to my code when my device are use in Landscape when i pushViewController it will automatic show in UIDeviceOrientationPortrait. i need to rotate my device to Portrait and then rotate to Landscape, then it will present in Landscape mode. how can i rotate to current of Orientation with out use of private API(setOrientation)? - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIDeviceOrientationPortrait) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight)); }

    Read the article

  • What's the proper size of Default png's for iPad?

    - by David John
    I am confused by conflicting information. Most commonly I see these being the sizes quoted for the various Default images: Launch image Portrait Default-Portrait.png 768 x 1004 Launch image Portrait [email protected] 1536 x 2008 Launch image Landscape [email protected] 2048 x 1496 Launch image Landscape Default-Landscape.png 1024 x 748 Seemed like slightly unusual sizes, but I went along with it and dragged the images into the Launch images section in XCode. XCode however promptly puts little yellow triangles over these images and tell me that the sizes should be: 768x1024, 1536x2048, 1024x768 and 2048x1536 Oh and one last important bit. Do I really need to have all these images for submission to the app store? It's really not clear which images are required and which are just recommended. Mine is a Universal app btw if that makes any difference.

    Read the article

  • printing out prime numbers from array

    - by landscape
    I'd like to print out all prime numbers from an array with method. I can do it with one int but don't know how to return certain numbers from array. Thanks for help! public static boolean isPrime(int [] tab) { boolean prime = true; for (int i = 3; i <= Math.sqrt(tab[i]); i += 2) if (tab[i] % i == 0) { prime = false; break; } for(int i=0; i<tab.length; i++) if (( tab[i]%2 !=0 && prime && tab[i] > 2) || tab[i] == 2) { return true; } else { return false; } //return prime; } thanks both of you. Seems like its solved: public static void isPrime(int[] tab) { for (int i = 0; i < tab.length; i++) { if (isPrimeNum(tab[i])) { System.out.println(tab[i]); } } } public static boolean isPrimeNum(int n) { boolean prime = true; for (long i = 3; i <= Math.sqrt(n); i += 2) { if (n % i == 0) { prime = false; break; } } if ((n % 2 != 0 && prime && n > 2) || n == 2) { return true; } else { return false; } }

    Read the article

  • How to detect image dimensions and run commands on them?

    - by Jon
    I have a directory full of images, some of which are portrait-sized instead of landscape-sized, and I want to open the portrait-sized ones with an image editor. I can run the imagemagick command identify and I get an output like something.jpg JPEG 1920x1255 1920x1255+0+0 8-bit DirectClass 159KB 0.000u 0:00.000. How can I have a script interpret this output, i.e. decide which is bigger, the 1920 or the 1255, and then run a command on it if it is?

    Read the article

  • problems programmatically creating UIView on iPad App

    - by user3871
    I have been struggling with this problem for a few days. My iPad app is designed to be a portrait game. To satisfy Apple's expection, I also support landscape mode. When it goes into landscape mode, the game goes into a letterbox format with back borders on the sides. My problem is I am creating the UIWindow and UIView programmatically. For some unkown reason, the touch controls are "locked" in to think I'm always in landscape mode. And even though visually in portrait mode everything looks correct, the top and bottom of the screen does not respond to touch. To summarize how I am setting this up, let me provide the skeletal framework of what I'm doing: in main.cpp: int retVal = UIApplicationMain(argc, argv, nil, @"derbyPoker_ipadAppDelegate"); In the delegate, I am doing this: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { CGRect screenBounds = [[UIScreen mainScreen] bounds]; CGFloat scale = [[ UIScreen mainScreen] scale ]; m_device_width = screenBounds.size.width; m_device_height = screenBounds.size.height; m_device_scale = scale; // Everything is built assuming 640x960 window = [[ UIWindow alloc ] initWithFrame:[[UIScreen mainScreen] bounds]]; viewController = [ glView new ]; [self doStateChange:[blitz class]]; return YES; } The last bit of code sets up the UIView... - (void) doStateChange: (Class) state{ viewController.view = [[state alloc] initWithFrame:CGRectMake(0, 0, m_device_width, m_device_height) andManager:self]; viewController.view.contentMode = UIViewContentModeScaleAspectFit; viewController.view.autoresizesSubviews = YES; [window addSubview:viewController.view]; [window makeKeyAndVisible]; } The problem seems to related to the line viewController.view.contentMode = UIViewContentModeScaleAspectFit; If I remove that line, touch works correctly in portrait mode. But the negative is when I'm landscape mode, the game stretches incorrectly. So That's not a option. The frustrating thing is, when I originally had this set up with a NIB file, it worked fine. I have read through the docs about UIWindow, UIViewController and UIView and have tried about everything to no avail. Any help would be greatly appreciated.

    Read the article

  • How do I rotate only some views when working with a uinavigationcontroller as a tab of a uitabbarcon

    - by maxpower
    Here is a flow that I can not figure out how to work. ( when I state (working) it means that in that current state the rules for orientation for that view are working correctly) First View: TableView on the stack of a UINavigationController that is a tab of UITabBarController. TableView is only allowed to be portrait. (working) When you rotate the TableView to landscape a modal comes up with a custom UIView that is like a coverflow (which i'll explain the problem there in a moment). A Selection made on tableview pushes a UIScrollview on to the stack. UIScrollView is allowed all orientations. (working) When UIScrollView is in landscape mode and the user hits back they are taken to the custom UIView that is like the coverflow and only allows landscape. The problem is here. Because the UIScrollView allows full rotation it permitted the TableView to rotate as well to landscape. I have a method attached to a notification "UIDeviceOrientationDidChangeNotification" that checks to see if the custom view is the current controller and if it is and if the user has rotated back to portrait I need to pop the custom view and show the table view. The table view has to rotate back to portrait, which really is okay as long as the user doesn't see it. When I create custom animations it works pretty good except for some odd invisible black box that seems to rotate with the device right before I fade out the customview to the tableview. Further inorder to ensure that my tableview will rotate to portrait I have to allow the customview to support all orientations because the system looks to the current view (in my code) as to whether or not that app is allowed to rotate to a certain orientation. Because of this I many proposed solutions will show the customview rotating to portrait as the table view comes back to focus. My other problem is very similar. If you are viewing the tableview and rotate the modalview of the customview is presented. When you make a selection on this view it pushes the UIScrollview onto the stack, but because the Tableview only supports portrait the UIScrollview comes in in portrait while the device is in landscape mode. How can I overcome these awful blocks? This is my current attempt: When it comes to working with UITabBarController the system really only cares what the tabbarcontroller has to say about rotation. Currently whenever a view loads it reports it supported orientations. TabBarController.m - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { switch (self.supportedOrientation) { case SupportPortraitOrientation: [[UIApplication sharedApplication] setStatusBarHidden:NO animated:YES]; return (interfaceOrientation == UIInterfaceOrientationPortrait); break; case SupportPortraitUpsideDownOrientation: [[UIApplication sharedApplication] setStatusBarHidden:NO animated:YES]; return (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown); break; case SupportPortraitAllOrientation: [[UIApplication sharedApplication] setStatusBarHidden:NO animated:YES]; return (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown); break; case SupportLandscapeLeftOrientation: [[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES]; return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft); break; case SupportLandscapeRightOrienation: [[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES]; return (interfaceOrientation == UIInterfaceOrientationLandscapeRight); break; case SupportLandscapeAllOrientation: [[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES]; return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight); break; case SupportAllOrientation: if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight) { [[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES]; }else { //[[UIApplication sharedApplication] setStatusBarHidden:NO animated:YES]; } return YES; break; default: return (interfaceOrientation == UIInterfaceOrientationPortrait); break; } } This block of code is part of my UINavigationController and is in a method that responds to the UIDeviceOrientationDidChangeNotification Notification. It is responsible for poping the customview and showing the tableview. There are two different versions in place that originally were for two different versions of the SDK but both are pretty close to solutions. The reason the first is not supported on 3.0 is for some reason you can't have a view showing and then showen as a modal view. Not sure if that is a bug or a feature. The second solution works pretty good except that I see an outer box rotating around the iphone. if ([[self topViewController] isKindOfClass:FlowViewController.class]) { NSString *iphoneVersion = [[UIDevice currentDevice] systemVersion]; double version = [iphoneVersion doubleValue]; if(version > 3.0){ //1st solution //if the delivered app is not built with the 3.1 SDK I don't think this will happen anyway //we need to test this [self presentModalViewController:self.flowViewController animated:NO]; //[self toInterfaceOrientation:UIDeviceOrientationPortrait animated:NO]; [self popViewControllerAnimated:NO]; [self setNavigationBarHidden:NO animated:NO]; [self dismissModalViewControllerAnimated:YES]; }else{ //2nd solution DLog(@"3.0!!"); //[self toInterfaceOrientation:UIDeviceOrientationPortrait animated:NO]; CATransition *transition = [CATransition animation]; transition.duration = 0.50; transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; transition.type = kCATransitionPush; transition.subtype = kCATransitionFade; CATransition *tabBarControllerLayer = [CATransition animation]; tabBarControllerLayer.duration = 0.50; tabBarControllerLayer.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; tabBarControllerLayer.type = kCATransitionPush; tabBarControllerLayer.subtype = kCATransitionFade; [self.tabBarController.view.layer addAnimation:transition forKey:kCATransition]; [self.view.layer addAnimation:transition forKey:kCATransition]; [self popViewControllerAnimated:NO]; [self setNavigationBarHidden:NO animated:NO]; } [self performSelector:@selector(resetFlow) withObject:nil afterDelay:0.75]; } I'm near convinced there is no solution except for manual rotation which messes up the keyboard rotation. Any advice would be appreciated! Thanks.

    Read the article

  • Disable usage of console-kit-daemon in Ubuntu

    - by Alex Marshall
    Hello, I administrate several Ubuntu 9.04 servers, and everytime I log in, I get the Landscape utility printout with server stats, etc. I really don't need this and it slows down my logins considerably. Can somebody please tell me how to disable message of the day as well as the landscape-sysin daemon ? I started tracking my logins using top, and when a user logs in, sshd shoots right up to 100% CPU usage, and I believe that landscape and the message of the day update daemon are the primary culprits. Does anybody else have any ideas as to what could be causing my horrible login times ?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >