我正在为 ios 8 创建自定义键盘。创建这样的键盘按钮
UIButton *aBtn = [ UIButton buttonWithType:UIButtonTypeCustom ];
[aBtn setFrame:CGRectMake(x, 30, btnWidth, btnHeight)];
[aBtn setImage:[UIImage imageNamed:@"A"] forState:UIControlStateNormal];
[aBtn setTitle:@"A" forState:UIControlStateNormal];
[aBtn setTitleColor:[ UIColor blackColor] forState:UIControlStateNormal];
[aBtn setTitleColor:[ UIColor whiteColor] forState:UIControlStateHighlighted];
[aBtn addTarget:self action:@selector(btnClicked:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:aBtn];
我的问题是图像未设置为按钮。我该如何解决这个问题?
我是否需要任何特殊步骤才能将图像添加到 Xcode 以用于自定义键盘?


