1
我正在使用iPhone6 +和iOS 8.3。將UITextField對齊設置爲正確
當,我想設置UITextField對齊到右側。但是當我發送它時,輸入文本跳轉到左側。
[tf setBackgroundColor:[UIColor clearColor]];
tf.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes:@{NSForegroundColorAttributeName:ISMColor(123, 123, 129)}];
tf.delegate = self;
tf.placeholder = placeholder;
[tf setTextAlignment:NSTextAlignmentRight];
[tf setContentHorizontalAlignment:UIControlContentHorizontalAlignmentRight];
是否有與文本字段您最初定義後相互作用的任何代碼?如果是的話,這也值得一提。您是否嘗試過其他(模擬)設備而不是6+? – mrkwse
在我的新項目中,它的工作使用相同的代碼, –
我得到了同樣的問題,你找到了一個解決方案嗎? –