1

I built a keyboard with the keyboard extension available in iOS 8. I created a custom view and I want to create a button image background, but the image does not appear in the keyboard. What needs to be done to put an image on my custom keyboard?

My code (call to the view):

UIView *layout = [[[NSBundle mainBundle] loadNibNamed:@"kyyBoardLogic" owner:self options:nil] objectAtIndex:0];
[self.inputView addSubview:layout];

Thanks: Yakir.

4

1 回答 1

0

不要添加子视图,而是使用此代码。这会将视图作为输入视图添加到给定的超级视图。

self.keyboard = [[[NSBundle mainBundle] loadNibNamed:@"keyView" owner:nil options:nil] objectAtIndex:0];
self.inputView = (id)self.keyboard;
于 2015-06-20T21:11:52.903 回答