InputAccessoryView does not show on iOS 8 simulator - ios8

I have iOS application since iOS 5, it includes a custom UITextView which use its own inputView and inputAccessoryView. It works with iOS 7 simulator, when it becomeFirstResponse, both inputView and inputAccessoryView show, but with iOS 8 simulator, only associated inputView shows, the inputAccessoryView does not show.
I am using Xcode 6 GM seed
HeInput_TextView.m
- (void)awakeFromNib
{
self.text = #"";
heKeyboard4x5 = [[HeKeyboard_ViewController alloc] init];
inputAccessoryVC = [[InputAccessory_ViewController alloc] init];
self.inputView = heKeyboard4x5.view;
self.inputAccessoryView = inputAccessoryVC.view;
}
Is it a bug in iOS 8 simulator or a change for iOS 8?
Edit:
I found more information about this problem.
This problem happens in Page-Based application, if an UITextView in a page of UIPageViewController, then the UITextView.inputAccessoryView doesn't show at iOS 8 simulator, but shows in iOS 7.1 simulator.
I creates two projects: 'Single-View Based application' and 'Page-Based application', and confirmed the problem happens as described above.

it is new behaviour of simulators in xcode 6. to see your custom accessory view or even default one try to uncheck hardware -> simulator -> connect harware keyboard.

It's an iOS8 bug.
You can reproduce it on the simulator in Apple's Contacts App.
Add a new contact and scroll down to "add a date".
Same problem. A colleague has raised an apple rdar.

I've found view accessories in iOS8 don't use the view's frame to offset their height above your InputView (or even the default software keyboard).
You might need to make sure your inputAccessoryView implements
-(CGSize)intrinsicContentSize
eg:
#implementation InputAccessory_View
// .. your code ...
-(CGSize)intrinsicContentSize{
return self.frame.size;
}
#end

My apologies, I misread the item. I've been driven batty by iOS8's keyboard issues.

Related

ios8 iPad splitview view issue

I am trying to ran my ios app using xcode 6 with ios8. On iOS8 ipad
splitview(basically master and detail screen) not rendering properly
but in ios7 it was able to render properly without any issues. The
issue was the maser view moved bit left since am seeing some unknown
images on right hand side of the master table view. This happens when i do change the orientation from portrait to landscape and vice verse.
Any idea how to fix this on ios8 ipad splitview?. For more info attaching screenshot
use this code in UITableViewController (or higher in hierarchy)
[[UITableViewCell appearance] setBackgroundColor:[UIColor whiteColor]];
Change the [UIColor whiteColor] to the color you want to replace the green with.
Setting background color for cell or content view in storyboard in Xcode does not solve the problem.
This problem occurs only on iPad under iOS 7.1.2 & 8.1 (i use these versions) and does not occur on iPhone (4S with iOS 8.1, 5S with 7.1.2, 6 with 8.1).
May be it happened in combination of Xcode 6.1 iOS 8.1 SDK and UISplitViewController.

Autolayout adjusts perfect in iOS 7 but not in iOS 6

I have a view in my app that is in landscape and I have set upp the UI in my storyboard so it responds as I want to different screen sizes. Now this works exactly as I want in iOS 7 but when I ran it the app in iOS 6 it is like it's not responding to my storyboard settings:
My app is mainly in portrait so this view in the app is set in landscape by subclassing the navigation controller:
// CustomNavigationLandscapeViewController.m
- (BOOL)shouldAutorotate
{
return NO;
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}
- (BOOL)shouldAutorotateToInterfaceOrientation(UIInterfaceOrientation)interfaceOrientation
{
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
So is there something that I'm doing wrong to get this behavior? Why does it work perfectly in iOS 7 but not in iOS 6?
After restarting Xcode and doing a clean the problem was solved. Guess it just was a glitch in Xcode that came in an inappropriate time.

UIPopover with UIDatePicker throws exception in iOS5.1

I have an enterprise iPad app that runs on several iPads of different vintage. All work fine except for one which is the only 1st generation iPad in the group. This iPad is running iOS 5.1.1. The app uses a UIPopoverController in several places and all work fine on this iPad except for the one that I last created.
Using the iPad 5.1 Simulator I was able to duplicate the problems…
The app crashes when trying to open a UIPopoverController which contains a UIViewController contining a UIDatePicker and a UIButton. The exception reads…
* Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'
Here is the code I am using up to the line that throws the exception…
DatePickerPopOverViewController *datePickerViewController =[[DatePickerPopOverViewController alloc] init];
datePickerViewController.defaultDate = lastPopoverDate;
datePickerViewController.buttonTitle = #"Get Schedule";
datePickerViewController.delegate = self;
UIPopoverController *datePickerPopOver = [[UIPopoverController alloc] initWithContentViewController:datePickerViewController];
I am pretty sure that all of the elemnts involved are available in iOS5.1. Any suggestions would be greatly appreciated.
John
You can not use autolayout below iOS 6.0. The exception you are seeing is a result of this. NSLayoutConstraint is the class used to define interface element relationships when using autolayout.
To continue to target versions below iOS 6.0, simply uncheck "Use Autolayout" in the IB interface.

How to solve changing location for Controls due to expansion in xcode 4.5 for UIView?

I have upgraded my xcode to 4.5 every thing is fine until I have added to my previous solution (which I had already developed it using xcode 4.3) new UIView which has a UIImageview control I have noticed that UIImage control location in xib differ than it's location when i run my app on ios5 devices
Any Idea how to solve this issue?
I'm not sure that i've understand your question correctly.
Try to hide device's statusbar.
You can do it in a current target settings or programmatically:
[UIApplication sharedApplication] setStatusBarHidden...

iOS 6 navigation - do I have to use storyboards?

I have an app that is working fine for iOS 5, I've just installed the iOS 6 simulator and my navigation is no longer working at all. Also my viewWillAppear and viewDidAppear methods are no longer firing.
I'm using [self.navigationController pushViewController:vc animated:YES]; to navigate. Do I have to use StoryBoards to navigate in iOS 6?
Thanks
No, Storyboards are optional and have been around since iOS 5.0. If your navigation is broken it'll be due to errors in your code.

Resources