UIView landscape only

Ads
 

UIView landscape only

HI,

How to display your view in landscape orientation only?

Thanks

View Answers

December 21, 2010 at 10:16 PM

Hi,

You use the following code in your view controller class:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Overriden to allow any orientation.
    //return YES;
    return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}

Thanks

Ads









Related Tutorials/Questions & Answers:
UIView landscape only
UIView landscape only  HI, How to display your view in landscape orientation only? Thanks   Hi, You use the following code in your view controller class: - (BOOL)shouldAutorotateToInterfaceOrientation
landscape orientation iPad
landscape orientation iPad   In my iPad application, i want to change the orientation as landscape only.. how could i be done? Currently i'm using... to landscape only ... either comment or delete the "return YES" and instead of it write
Advertisements
uiview alloc initwithframe
uiview alloc initwithframe  Hi, How I can make uiview programmatically? Tell me good code for UIView alloc using initwithframe method. Thanks   Hi, You can use following code: UIView *modalView = [[[UIView alloc
changing uiview background color
changing uiview background color  changing UIView background color in ios   self.view.backgroundColor = [UIColor colorWithRed:244.0f/255.0f green:230.0f/255.0f blue:183.0f/255.0f alpha:1.0f
how printing landscape?
how printing landscape?  I have code which print some data from data... "Print Dialog", but it does not work if chose "Landscape". Is any way to print LANDSCAPE
UIView Background Image
UIView Background Image  HI, Please let's know how to add background image to a view? Thanks   Hi You can use the following code...:@"myimage.png"]]; Read more at UIView Image Background Tutorial page. Thanks
how to get UIView by tag
how to get UIView by tag  In IOS application how to get a view by the tag id? Thanks   Hi, You can get this with the help of the function... view: for (UIView *i in self.view.subviews){ if([i isKindOfClass:[UILabel
add imageview to uiview
add imageview to uiview  i want to add an image to UIView background.   self.view.backgroundColor = [UIColor colorWithPatternImage... to UIView Add an Image or Image URL to your ImageView. Code: UIImageView
ModuleNotFoundError: No module named 'seq-landscape'
ModuleNotFoundError: No module named 'seq-landscape'  Hi, My... 'seq-landscape' How to remove the ModuleNotFoundError: No module named 'seq-landscape' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'seq-landscape'
ModuleNotFoundError: No module named 'seq-landscape'  Hi, My... 'seq-landscape' How to remove the ModuleNotFoundError: No module named 'seq-landscape' error? Thanks   Hi, In your python
UIView Access Subviews
UIView Access Subviews In the example, you'll learn how to create and access a subview on UIView. Syntax of adding subview at UIView. - (void)addSubview:(UIView *)view; Creating and accessing a subview : In the example we
UIView frame x,y width and height
UIView frame x,y width and height  HI, How to print the x,y width and height of UIView? Thanks   Hi, Following code can be used: CGRect myFrame = myview_.frame; NSLog(@"height = %f", myFrame.size.height); NSLog
Digit Only text field
Digit Only text field  How should we accept digits only in a textbox? (using JSTL only, without Javascript
ModuleNotFoundError: No module named 'only'
ModuleNotFoundError: No module named 'only'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'only' How to remove the ModuleNotFoundError: No module named 'only' error
Only Display Date
Only Display Date  I want to implement only date not time like that 20 Sep 2011. How can possiple it?   Your question is not clear. Which technology you use? java/.NET/SQl
Allowing only localhost in Elasticsearch
Allowing only localhost in Elasticsearch  Hi, I have installed Elasticserch on the production platform. Now I want to enable its access only from localhost. How I can allow Elasticseach from localhost only? Thanks   
bootstrap affix only on desktop
bootstrap affix only on desktop  Hi, I am using bootstrap plugin... get fixed in the mobile/tablet screen also. I want the bootstrap affix only... affix should not work there. So, how I can enable bootstrap affix only
mysqldump structure only
only? Provide me the syntax to take mysqldump structure only. Thanks   Hi, You can use -d option with mysqldump command to take the structure only... to dumb only tables definitons , not the data ? use ?d command? if path is not set
Works only for one row
Works only for one row   Hi, My below code is working only if there is a single row. could you please help me in doing it for all the rows retrieved from the database. <%@page import="java.util.concurrent.CountDownLatch
ModuleNotFoundError: No module named 'kwargs-only'
ModuleNotFoundError: No module named 'kwargs-only'  Hi, My Python... 'kwargs-only' How to remove the ModuleNotFoundError: No module named 'kwargs-only' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'pytest-only'
ModuleNotFoundError: No module named 'pytest-only'  Hi, My Python... 'pytest-only' How to remove the ModuleNotFoundError: No module named 'pytest-only' error? Thanks   Hi, In your python environment
Allow to Enter only numeric data.
Allow to Enter only numeric data.  hi....... I want to ask... that the user should allow to enter only numeric data. I mean to say that if user... that enter only numeric data. So how this can be done? what will be the code
docker list only stopped containers
docker list only stopped containers  Hi, I am new to docker... to list only stopped containers in Docker? Thanks   Hi, The docker... the stopped only containers on the Docker server. If you want to find out all
how to get only checked data
how to get only checked data  my problem is that i have a jsp page on which i retrieve data from the database through servlet , on the jsp page... button it should redirect only checked data to other jsp page which is connected
Textbox allows only numbers in java wicket
Textbox allows only numbers in java wicket  Please provide me wicket code for text box that allows only numbers to type. Thank you
ModuleNotFoundError: No module named 'aiy-voice-only'
ModuleNotFoundError: No module named 'aiy-voice-only'  Hi, My... named 'aiy-voice-only' How to remove the ModuleNotFoundError: No module named 'aiy-voice-only' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'aiy-voice-only'
ModuleNotFoundError: No module named 'aiy-voice-only'  Hi, My... named 'aiy-voice-only' How to remove the ModuleNotFoundError: No module named 'aiy-voice-only' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'class-only-design'
ModuleNotFoundError: No module named 'class-only-design'  Hi, My... named 'class-only-design' How to remove the ModuleNotFoundError: No module named 'class-only-design' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'class-only-design'
ModuleNotFoundError: No module named 'class-only-design'  Hi, My... named 'class-only-design' How to remove the ModuleNotFoundError: No module named 'class-only-design' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'django-only-staff'
ModuleNotFoundError: No module named 'django-only-staff'  Hi, My... named 'django-only-staff' How to remove the ModuleNotFoundError: No module named 'django-only-staff' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'django-read-only-admin'
ModuleNotFoundError: No module named 'django-read-only-admin'  Hi...: No module named 'django-read-only-admin' How to remove the ModuleNotFoundError: No module named 'django-read-only-admin' error? Thanks   Hi

Ads