MFMessageComposeViewController broken on iOS 5 #19

Open
manuelkasper opened this Issue Dec 25, 2012 · 2 comments

Projects

None yet

3 participants

@manuelkasper

Merely including DAKeyboardControl in a project breaks MFMessageComposeViewController under iOS 5: when the view appears, the message text input field is not visible. If a list of recipients has also been set via code, then the text field appears initially, but disappears as soon as the user taps the recipient field.

It seems that the "null" input accessory view that DAKeyboardControl sets interacts badly with MFMessageComposeViewController. I've been able to fix the missing input field with the following ugly hack. Not sure if this is the right way though:

- (void)swizzled_addSubview:(UIView *)subview
{
    if (([subview isKindOfClass:[UITextView class]] || [subview isKindOfClass:[UITextField class]]) &&
        strcmp(object_getClassName(subview), "MFRecipientTextField") != 0)
    {

No problems on iOS 6, presumably due to the new remote view controllers.

dak_test_mfmsgview

@danielamitay

Thanks for bringing this to my attention. I do not have access to a physical iOS5 device at the moment, but will debug when I am able to.

@Mojo90

Same over here. even on iOS 6 it doesn't work for me.
The log says: "Application tried to push a nil view controller on target ."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment