Rotating the buttons in app when I rotate the iPad upside down - objective-c

I'm programming an iPad application and I just wrote the rotate methods and there are some buttons. I used CGRectMake method and re-positioned buttons ... portrait and landscape modes all works fine but my problem is buttons are not re-positioned when I turn my ipad upside down. Need Help

UIDeviceOrientationPortraitUpsidedown is the solution

Related

Popover transparent in IPAD simulator but not in device

I have a popover in my app, a simple one with only a "textview" in it. I managed to make it transparent, that is, that only "thetext" shows, being totally transparent to the image below (image on view, not in the popover). Did this with this in viewDidAppear:
self.viewpoptexto.superview.superview.alpha = 0.9f;
The problem is, this works fine when i run the app in the simulator (IPAD, IPAD retina, IPAD retina 64bits), but running on the device, the popover shows a white background and stills get drawn.
XCODE 5 and IOS7.
Any help would be much appreciated, thanks.
You could try to set the popover background color to clearColor.
[popover setBackgroundColor:[UIColor clearColor]]

lock a view to launch initially in landscape (ONLY landscape) objective-C

I want to initially launch one of the View controllers in JUST landscape mode, while the other views and the whole app can work in both portrait and landscape. How can I do it in iOS 7? Thank you.
So your whole app may supports all orientations but one view controller needs to be landscape only.
You can easily stop your landscape view controller to rotate from landscape to portrait but when the app is in portrait already then it is difficult to force the deivce to rotate as this contradicts the iPhone manufacturers priciple.
In fact, it is not really difficult when you know the trick. See my answer to this similar question.
Force controllers to Change their orientation in Either Portrait or Landscape

Mimicking iOS 6 camera rotation

I have been doing some experiments with a custom camera using AVFoundation and so far everything's been great. The AVCam example got me very far and I am quite happy with the results.
However, one thing I still don't get is how the iOS default Camera app handles rotations. It seems like the background does not rotate at all but all the overlay controls do.
This is probably not a camera-specific question but how could I achieve this behaviour?
TLDR: Have a background camera layer, controls on top, how to rotate controls without rotating the background layer?
I've been wondering on the same...
My guess would be that the native Camera viewController doesn't rotate using the UIViewController rotation mechanism
no status bar rotation
no 'basic' rotation of subviews - toolbar doesn't move, buttons are animated
and of course the view containing the camera preview doesn't rotate :)
Rather it must call [UIDevice beginGeneratingDeviceOrientationNotifications] and handle specific UI update (grey buttons fading position switching, and toolbar buttons image rotation)
[[NSNotificationCenter defaultCenter] addObserver:self selector:#selector(yourUpdateMethodForRotation:) notificationName: UIDeviceOrientationDidChangeNotification];

IOS reorganize graphics on rotation

I'm making an iPad application with 19 buttons which are alle graphics. They are aligned next to and underneath eatchother, like in a grid. In portrait mode they are displayed nicely (because that's how I've set them) but I don't know what settings I need to choose for landscape mode.
When the device turns to landscape I've got room for 4 columns in stead of 3 in portrait for instance.
How can I make the app automatically adjust they layout of the buttons when rotated?
Thanks
In iOS5.1 or older, you will need to do this in code. In iOS6, its possible you can use a UICollectionView - not sure haven't played with it.

xCode: setView always portrait though device in Landscape

I have encountered a problem developing an iPad app with xCode.
When I load a view into my rootViewController like this
[self setView:viewController.view];
The view is always displayed in Portrait even though the device is rotated to landscape.
I checked all options and tried changing the shouldAutoRotateToOrientation method and it seems to have nothing to do with it.
If I rotate the device to portrait and then back to landscape it works.
Does anybody know why this is happening?
Best regards,
Matteo
The problem was that I was nesting viewControllers which leads to bad behavior like rotation notifications not being sent to certain ViewControllers.