我尝试自定义我的UITextField
对象
但leftView
它向右移动了一些像素
我怎样才能改变我的位置UITextField.leftView
这是我的代码
NSArray *itemArray = @[@"<", @">"];
UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] initWithItems:itemArray];
segmentedControl.frame = CGRectMake(0, 0, 60, 26);
segmentedControl.segmentedControlStyle = UISegmentedControlStylePlain;
_urlTextField.leftView = segmentedControl;
_urlTextField.leftViewMode = UITextFieldViewModeAlways;