1
成功顯示inputAccessoryView
,但它是全黑的。設置UITextField的alpha值inputAccessoryView不起作用
_textField = [[UITextField alloc] initWithFrame: CGRectZero]; // update frame later
_textField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
UIView *inputAccessoryView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 180)];
inputAccessoryView.backgroundColor = [UIColor blackColor];
inputAccessoryView.alpha = 0.2;
_textField.inputAccessoryView = inputAccessoryView;
我對此完全困惑......任何人都可以解釋它爲什麼會發生?
爽!感謝您的快速回復~~! – flypig