CSS media query to target iPad and iPad only?

Finally found a solution from : Detect different device platforms using CSS <link rel=”stylesheet” media=”all and (device-width: 768px) and (device-height: 1024px) and (orientation:portrait)” href=”https://stackoverflow.com/questions/8271493/ipad-portrait.css” /> <link rel=”stylesheet” media=”all and (device-width: 768px) and (device-height: 1024px) and (orientation:landscape)” href=”ipad-landscape.css” /> To reduce HTTP call, this can also be used inside you existing common CSS file: @media all … Read more

Popovers cannot be presented from a view which does not have a window

the thing that saved my life: if (self.view.window != nil) [popoverController presentPopoverFromRect:CGRectMake(44, yCoord, 111, 111) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES]; by adding if condition it doesn´t crash anymore. I don´t really get it because the presentPopoverFromRect function is ALWAYS called. There is no situation where window would be nil but anyway it did the trick. edit: I … Read more

Multiple “apple-touch-startup-image” resolutions for iOS web app (esp. for iPad)?

definitive solution for startup-image and touch-icons for iPad and iPhone (landscape || portrait) and (retina || not): <!– iPhone ICON –> <link href=”https://stackoverflow.com/questions/4687698/apple-touch-icon-57×57.png” sizes=”57×57″ rel=”apple-touch-icon”> <!– iPad ICON–> <link href=”apple-touch-icon-72×72.png” sizes=”72×72″ rel=”apple-touch-icon”> <!– iPhone (Retina) ICON–> <link href=”apple-touch-icon-114×114.png” sizes=”114×114″ rel=”apple-touch-icon”> <!– iPad (Retina) ICON–> <link href=”apple-touch-icon-144×144.png” sizes=”144×144″ rel=”apple-touch-icon”> <!– iPhone SPLASHSCREEN–> <link href=”apple-touch-startup-image-320×460.png” media=”(device-width: 320px)” … Read more

Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES’

In IOS6 you have supported interface orientations in three places: The .plist (or Target Summary Screen) Your UIApplicationDelegate The UIViewController that is being displayed If you are getting this error it is most likely because the view you are loading in your UIPopover only supports portrait mode. This can be caused by Game Center, iAd, … Read more

ipad safari: disable scrolling, and bounce effect?

This answer is no longer applicable, unless you are developing for a very old iOS device… Please see other solutions 2011 answer: For a web/html app running inside iOS Safari you want something like document.ontouchmove = function(event){ event.preventDefault(); } For iOS 5 you may want to take the following into account: document.ontouchmove and scrolling on … Read more