我正在更新一些旧代码,为了在工具栏中腾出更多空间,我正在将按钮从测试转换为图像。loadView中新旧代码的一个例子是这样的://Newcode,doesn'twork.UIButton*toggleKeyboardBtn=[UIButtonbuttonWithType:UIButtonTypeCustom];toggleKeyboardBtn.bounds=CGRectMake(0,0,showKeyboardImage.size.width,showKeyboardImage.size.height);[toggleKeyboardBtnsetImage:showKeyboardI