我尝试了所有方法但没有用,因为我的逻辑能力很差......问题是我需要用uitextfield替换句子中的一个单词,让它看起来像一个空白,而且太动态了
例如:测试到达现场
我需要用 UItextfield 替换上面句子中的“Test”,以便用户可以输入 uitextfield。请告诉我更换它的方法..
我用 uitextview 来显示问题,代码是
UITextview *textview = [[UITextView alloc] initWithFrame:CGRectMake(0.0, currentY, 320.0, myStringSize.height)];
textview.text = [NSString stringWithFormat:@"%i. %@", i+1, unhide];
textview.font = [UIFont fontWithName:@"Helvetica" size:16.0f];
CGRect frame = textview.frame;
frame.size.height = textview.contentSize.height;
textview.frame = CGRectMake(0.0, currentY, 320.0, frame.size.height+20);
textview.editable = NO;
[scrollMain addSubview:textview];
有什么办法可以吗...
或者有没有办法在textview中找出“Test”的坐标?帮帮我,提前谢谢。