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

// Ensure that the view controller supports rotation and that the split view can therefore show in both portrait and landscape.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return YES;
}

Please help. Thanks in advance!

View Answers

December 16, 2010 at 11:44 AM

To fix the orientation to landscape only ... either comment or delete the "return YES" and instead of it write ..

return UIInterfaceOrientationIsLandscape(interfaceOrientation);

See the code given below..

-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    //return YES;
    return UIInterfaceOrientationIsLandscape(interfaceOrientation);

}









Related Tutorials/Questions & Answers:
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... therefore show in both portrait and landscape. - (BOOL
Orientation iPhone SDK
please keep in mind that landscape orientation is not possible in the case... application that is both portrait and landscape orientation enabled... alike the given images. You can also set the landscape orientation
Advertisements
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...:(UIInterfaceOrientation)interfaceOrientation { // Overriden to allow any orientation
iphone handle orientation change
iphone handle orientation change   How can i handle the orientation change in iPhone / iPad application? Please suggest. Thank in Advance
ipad default image names
ipad default image names  i have a problem while launching application in iPad. The Default image that i have set is not displaying in landscape mode correctly. please suggest. Thanks.   ipad Default image names
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
iPad application designer
is fisible in iPad  In landscape mode, both master and design...iPad application designer Are you looking for the experienced graphics designer for designing your iPad application? Look no further, we provide
pdf landscape
pdf landscape       In this free tutorial we are going to tell you about landscape portrait in iText... you will know more about the landscape portrait.  To make a program over
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
Change orientation of UIViewController
Change orientation of UIViewController  Is it possible to change the UIViewController orientation dynamically
iPhone landscape mode
iPhone landscape mode In this series of iPhone application development tutorial, you'll learn launching your iPhone app in landscape mode. Believe me it's very simple to change your iphone app in landscape mode. Just follow
iPad App to store data
iPad App to store data  Hi, How to add data support iPad application? Thanks
universal binary for ipad iphone
universal binary for ipad iphone  How can i create a universal binary for iPad and iPhone
scrolling div ipad
scrolling div ipad   Please suggest me how to scroll the div in iPad UIWebView? Thanks
iPad development outsourcing
iPad development outsourcing Save lot for cost cost by outsourcing iPad development projects to our iPad/iPhone development team in India. Outsource your iPad development projects to our offshore iPhone/iPad development team and save
iPhone iPad Default.png
iPhone iPad Default.png  How can i set the default image for both iPhone and iPad in my global application XCode?? Thanks
iPhone/iPad Project xCode
iPhone/iPad Project xCode  hii Can I compile the same iPhone source code for iPad?   Yes you can do so.ADS_TO_REPLACE_1 Yes. This is called a Universal binary. so you can compile the same iPhone source code for iPad
ipad external display tutorial
ipad external display tutorial  Hi, I am looking for a iPad external display tutorial. I have a VGA adapter but my application need to support it to show anything on external device. Please suggest me. Thanks
ipad screen resolution pixels
ipad screen resolution pixels  Hi! Can you tell the exact size of the iPad in pixels ..including height & width. Thanks Very Much!   Finally find it on the apple website...ADS_TO_REPLACE_1 The iPad display has
iPhone and iPad universal app
iPhone and iPad universal app  I am writing a universal application in iPhone and iPad that is not working in iPhone simulator. Though i have tested it in the iPad successfully. On running the application in the device it returns
iPad Tutorials
iPad is amazing device from Apple. The iPad has been said to retain all the benefits of technology that you find in Apple?s iMac. The operating system is OS... to be seen whether the same will be true for the iPad. The downside is that you
iPad Application Development Services
iPad Application Development Services iPad Application Development services from Rose India Technologies Pvt. Ltd. iPad Application Development is the process of designing, coding, testing and releasing the iPad Application
iPad Application Development in India
iPad Application Development in India We provide iPad Application Development service in India. Get your iPad and iPhone application developed in India at our software development center. India is premiere place for outsourcing iPad
iPhone & iPad application development
iPhone & iPad application development We are leading company for iPhone & iPad application development and support. Our team is expert in iPhone and iPad application development to support businesses of our clients. We develop
Rotating UIViewController
to rotate your UIView into both portrait or landscape orientation. Steps for Rotating UIViewController in both portrait and landscape orientation.ADS_TO_REPLACE_1... requirement and we want it to work in portrait and landscape orientation. ADS
Music Can Be Heard on the iPad
Music Can Be Heard on the iPad The Apple iPad is a device that, like... that are used to make the iPad more versatile and entertaining. It is great to see all of the features that work with music on the iPad. First there is the ability
ModuleNotFoundError: No module named 'kw-pricing-orientation'
ModuleNotFoundError: No module named 'kw-pricing-orientation'  Hi...: No module named 'kw-pricing-orientation' How to remove the ModuleNotFoundError: No module named 'kw-pricing-orientation' error? Thanks   Hi
ModuleNotFoundError: No module named 'kw-pricing-orientation'
ModuleNotFoundError: No module named 'kw-pricing-orientation'  Hi...: No module named 'kw-pricing-orientation' How to remove the ModuleNotFoundError: No module named 'kw-pricing-orientation' error? Thanks   Hi
ModuleNotFoundError: No module named 'face-orientation-prep-natchapolt'
ModuleNotFoundError: No module named 'face-orientation-prep-natchapolt' ...: ModuleNotFoundError: No module named 'face-orientation-prep-natchapolt' How to remove the ModuleNotFoundError: No module named 'face-orientation-prep-natchapolt'
iPad Application Development India
iPad Application Development India Apple Inc. on April 03, 2010 launched... that run on its another awesome devices iPhone and iPod Touch. With the new iPad... available only on small screen of iPhone and iPod Touch. Apple’s iPad has
iPad Application Development in India
iPad Application Development in India We have technical team and required infrastructure to develop high quality iPad and iPhone applications. Our technical team provides iPad Application Development and testing services in India. Use
app crashed in ipad 2 running iOS 5.0.1
app crashed in ipad 2 running iOS 5.0.1  i developed a universal application for both iPhone and iPad the application works fine when i test on my iPad. But apple has rejected it twice saying that.. "We found your app crashed
Version of com.gluonhq>charm-down-plugin-orientation dependency
List of Version of com.gluonhq>charm-down-plugin-orientation dependency
Go Wild With iPad Accessories
Go Wild With iPad Accessories Apple has done it again with the release of the iPad. Brand lovers the world over have been flocking to stores to get in on the action. If you have heard anything about the iPad surely you would have
How Does the Display Work for the iPad?
How Does the Display Work for the iPad? The iPad from Apple is a great... of the iPad comes from the display that it uses. Here is a great look at how the display of the iPad works. It uses all sorts of great features that make it more
iPad Apps Development
iPad Apps Development Apple Inc that is know for its unique quality... wonder – iPad – world's first table computer that works similar... the two models of iPad: one with 802.11n Wi-Fi and one with 802.11n Wi-Fi
Version of com.gluonhq>charm-down-plugin-orientation-android dependency
List of Version of com.gluonhq>charm-down-plugin-orientation-android dependency
Version of com.gluonhq>charm-down-plugin-orientation-ios dependency
List of Version of com.gluonhq>charm-down-plugin-orientation-ios dependency
Handling an iPad is Easy to Do
Handling an iPad is Easy to Do If there is one complaint that people can... to be easily controlled. This is where the iPad is different from other gadgets. The iPad from Apple is a device that is easy for anyone to carry around. It is also
The isTouch Screen on the iPad a Convenient Feature
The Touch Screen on the iPad is a Convenient Feature One of the best features that the Apple iPad has is its ability to work with a touch screen... of activities and functions on the iPad. This makes for a convenient tool that anyone
What Functions Can the iPad Handle?
What Functions Can the iPad Handle? A person who takes an Apple iPad out... with the iPad when it is being handled. It is incredibly easy to get... used web browser on Apple products, can be used on the iPad. This browser
The iPad is a Popular Tool for Business Needs
The iPad is a Popular Tool for Business Needs There are all sorts of fun things that people can do on the Apple iPad but there are also plenty of different business tools that can work on it. These business processes on the iPad
What Apps Can the iPad Use?
What Apps Can the iPad Use? The applications, or apps, that are available on the iPad are ones that come in many different forms. They are all used to get the iPad to work with a variety of different functions. These are individual
Setting a Background image for UITableView in iPhone & iPad application.
Setting a Background image for UITableView in iPhone & iPad application.  in my iPhone application i am using a simple UITableView to show the listing. But the it looks very simple.. (white color). Though i can change
iPad Apps Development India
iPad Apps Development India Roseindia Technologies Pvt. ltd., a Delhi based... and iPod, is now working on developing several genuine iPad apps... for iPad and offered its Software Development kit to developers to develop
ModuleNotFoundError: No module named 'Python-video-annotator-module-find-orientation'
-orientation'  Hi, My Python program is throwing following error...-orientation' How to remove the ModuleNotFoundError: No module named 'Python-video-annotator-module-find-orientation' error? Thanks   Hi
Maven Dependency charm-down-plugin-orientation >> 3.0.0
You should include the dependency code given in this page to add Maven Dependency of com.gluonhq >> charm-down-plugin-orientation version3.0.0 in your project
Maven Dependency charm-down-plugin-orientation >> 3.2.0
You should include the dependency code given in this page to add Maven Dependency of com.gluonhq >> charm-down-plugin-orientation version3.2.0 in your project
Maven Dependency charm-down-plugin-orientation >> 3.2.1
You should include the dependency code given in this page to add Maven Dependency of com.gluonhq >> charm-down-plugin-orientation version3.2.1 in your project

Ads