2

I'm facing one critical issue with objective c, where I have added new custom keyboard extension on my application and loaded one xib for keyboard view.

but when I open the keyboard view its showing blank - there is no UI coming to form XIB View.

below is my code to load the xib on UIInputViewController.

Note: this adding the extension with xib view is working fine with Swift - this issue is coming only on Objective-C.

*KeyboardViewController.h

#import <UIKit/UIKit.h>
#import "NicBoard.h"

@interface KeyboardViewController : UIInputViewController
{
    NicBoard *objNicBoard;
}

@end

KeyboardViewController.m

objNicBoard = [[NicBoard alloc] initWithFrame:CGRectMake(0, 0, 375, 215)];
    objNicBoard = [[[NSBundle mainBundle] loadNibNamed:@"NicBoard" owner:self options:nil] objectAtIndex:0];
    objNicBoard.translatesAutoresizingMaskIntoConstraints = NO;

    objNicBoard.frame = CGRectMake(0, 0, 375, 215);
    objNicBoard.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
    [self.view addSubview:objNicBoard];

image for the xib. enter image description here the output on the while opening extension on the keyboardenter image description here

Akash Thakkar
  • 941
  • 1
  • 6
  • 16
  • check this https://stackoverflow.com/questions/35518517/load-a-nib-file-to-act-as-a-custom-keyboard-when-a-uitextfield-is-tapped – Mohamed Helmy Jun 24 '17 at 13:43

0 Answers0