我想更具体地将文本定位在文本字段中。
我当前的代码:
UITextField * textFieldIndustry = [[UITextField alloc] initWithFrame:CGRectMake(10, 10, 465, 68)];
textFieldIndustry.font = [UIFont systemFontOfSize:17.0];
textFieldIndustry.placeholder = @"Tap to..";
textFieldIndustry.textAlignment = NSTextAlignmentCenter;
这段代码:
textFieldIndustry.textAlignment = NSTextAlignmentCenter;
将文本居中,但不完全位于我想要的位置。如何使用例如 X 和 Y 定位?