UIImagepickerController cameraOverlayView in iOS 5 - cocoa-touch

I am writing an augmented reality app. I can present my UI as an overlay over the UIImagePickerController by adding subviews to its cameraOverlayView. This has worked well all along, but in iOS 5, I can't see any of the subviews of cameraOverlayView.
What gives?

Related

iOS 11: UICollectionView: when appearing, scrolling happens

when my UIViewController appears with a UICollectionView inside, the content scrolls up a little bit, when appearing.
I implemented scrollViewDidScroll: and I'm logging the contentOffset.y:
-20.000000
-20.000000
0.000000
0.000000
This only happens on iOS 11 (simulator and device), not on iOS 10 or iOS 9. Anyone else experiencing this?
EDIT VERY WEIRD thing: this only happens when viewDidLoad is NOT called, so e.g. when the UIViewController already exists and it is popped onto again, but not when first showing that UIViewController...
In iOS 11, contentInset.top can be added in UIScrollView and subclasses (UICollectionView, UITableView) while status bar, navigationBar or other content appear in your view hierarchy.
This inset come from new adjustedContentInset property. (doc : adjustedContentInset)
To remove this extra inset, set content inset adjustment on your scrollView to never :
[self.myScrollView setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever];
More info in the WWDC17 video : Updating Your App for iOS 11 at 19'

Can I live render a UINavigationBar in Xcode 6?

I have successfully used the live rendering feature in Xcode 6 to show a UIView in Interface Builder.
Now I want to use live rendering with a UINavigationBar. I have tried to set it up in IB as I did with a UIView without success.
Is it possible to live render a UINavigationBar in Xcode 6, or am I missing something?

UISearchBar doesn't work in an IOS 6 Popover

The app has a UIView with a table view and a UISearchbar on it. The searchbar delegate methods are in the view controller for the UIView. Everything appears to be hooked up correctly.
This searchbar works correctly in iOS 5, but not in iOS6. When touched, the searchbar brings up the keyboard, but typing on the keyboard has no affect; the textDidChange delegate method is never called.
This occurs only when running on an iPad. The difference between the view on an iPad versus the iPhone is that the UIView with the UITableView and UISearchbar runs in a popover on the iPad. On an iPhone, it runs as a separate view. In both cases, once the view is opened, a UINavigationController manages the view. All the navigation up and down the nav controller works fine in both devices; the only difference is that the UISearchBar does not work running in the popover.
Obviously, something has changed between iOS 5 and iOS 6, but I haven't been able to figure out what, or how to make the searchbar work in an iOS 6 popover.
Any help will be greatly appreciated!
rokjarc is right. I have same problem. In my app'SearchBar Display Controller, SearchBar is not respond to keypad typing in ios6. But it is fine in ios5 simulater, ios6 simulater, iPhone 3GS, iPhone 4.
In MainWindow.xib,
1. Click "Window" icon in "objects" Box.
2. Show Attribute inspector
3. Expend window attribute.
4. Check "Visible at Launch" and "Full Screen at Launch"
5. Clean build and run.
6. Good. OK?
I just got the answer on my original problem. I discovered that the same thing was occurring in UITextFields and UITextViews. I sent the whole thing off to Apple Tech Support.
Turns out that you have to include this line of code:
[self.window makeKeyAndVisible];
in the application's delegate's didFinishLaunchingWithOptions: method. When I added this line, the problems went away.
Hope this helps.

Autorotation in ios 5 vs. ios 6 issues

I have an iPad app that must support iOS 5.0 and later. I have a bug that behaves differently in 5.0/5.1 than it does in 6.0. The issue is a view controller in a tabbarcontroller that pushes a modal view, which in turn pushes a full-screen view via navigationController. The problem is, when in the full-screen view, if the iPad is rotated, the underlying viewcontroller (one in the tabbarcontroller) doesn't rotate. Now let me break down the differences in iOS versions:
First of all, this viewController in question implements shouldAutoRotateToInterfaceOrientation (returns YES) as well as willRotateToInterfaceOrientation and willAnimateRotationToInterfaceOrientation.
In iOS 6.0, I noticed that the rotation methods (willRotate... & willAnimate...) were not being called, so I registered it to receive the UIDeviceOrientationDidChangeNotification notification and execute the code from the two Rotate methods if I received that notification and the other methods hadn't executed. That fixed the issue in iOS 6.0.
Problem is, in 5.0/5.1 the rotation methods (willRotate... & willAnimate...) ARE being executed, but the view is not rotating. If the "full-screen view" is not presented over top of this view controller and the iPad is rotated, these two methods execute and the views rotate accordingly.
Please help. Thanks in advance.
Things I've tried other than that stated above.
I've tried checking the UIDeviceOrientation and converting it to a UIInterfaceOrientation and calling [self shouldAutorotateToInterfaceOrientation:xxx]; The view still displays wrong.
When the two rotation methods are being executed, do the CAAffineTransformation for your view. when you are back to normal, again do the same with -90 degree.
https://developer.apple.com/library/ios/#documentation/GraphicsImaging/Reference/CGAffineTransform/Reference/reference.html

Buttons working in ios6 stopped working in ios5

I load two buttons in one view from the NIB.
I set this view as self.navigationItem.rightBarButtonItem in current viewController
I set actions for these buttons
Result:
Buttons work under ios6 - both simulator and device and not working on ios5 device.
Any idea to fix it?
I fixed it by set "Autosizing" in "Size inspector".
(in my case, the problem came from resize iPhone5 to iPhone4)
The problem is now solved. This was caused by setting UIViews objects in IB and then setting its class to UIButton. It should have no effect on buttons behaviour, but it had. The more wired was that it did work on iOS 6 and did not in iOS 5.