2

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.

4 Answers 4

3

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.

3
  • I unchecked hardware -> Keyboard -> connect harware keyboard, inputAccessoryView still does not show on iPhone5(8.0), but shows on iPhone5(7.1).
    – heMac
    Commented Sep 14, 2014 at 16:06
  • @heMac I am using github.com/simonbs/BSKeyboardControls in my project. It has custom inputAccesoryView. Works fine is simulator 6 ios 8. You can checkout the project test and may be observe some idea from working code. Commented Sep 14, 2014 at 16:16
  • @nyekimon Thanks, this sample convinces InputAccessoryView shows on iOS 8 simulator, so the program is inside of my project.
    – heMac
    Commented Sep 14, 2014 at 19:16
3

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.

1
  • Thanks for the down vote! This IS a bug, in the contacts App it is not possible to enter a date when a the hardware keyboard is connected. How is this expected behaviour?
    – Brett
    Commented Nov 8, 2014 at 22:49
1

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
1
  • View controllers don't have frame
    – PiotrDomo
    Commented Mar 22, 2016 at 16:59
0

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

2
  • 1
    Fixed in iOS8.1, it was a bug.
    – Brett
    Commented Nov 12, 2014 at 1:24
  • Elaborating on your inputAccessoryView workaround - How would you propose cleanly detecting whether an inputView has/hasn't been hidden by a physical keyboard and should have its content shoved into the inputAccessoryView? Otherwise non-physical keyboard users will have the equivalent of two inputViews onscreen. (keyboard + inputAccessoryView)
    – Maple
    Commented Nov 17, 2014 at 21:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.