English 中文(简体)
• 如何获得UIText 类似UIText Field的看法
原标题:how to get a UITextView to Clear like a UITextField does

试图获得《美国国际法案例汇编》,以便像《美国国际法案例汇编》那样明确。 实地似乎无法得到我在发出像电子邮件或与几条文字线的tw照之后需要澄清的信息。 任何法典都会非常感激。

问题回答

添加一个 but子然后:

- (IBAction)clearField:(id)sender
{
    textView.text = @""; // textView is of type UITextView
}




相关问题
Increase UITextField to Certain Length

I have a UITextField that I would like to "automatically" adjust its bounds size in order to make space for the string added in the field. However, I would like it to max-out in terms of width at a ...

iPhone UITextView scrollable but not editable

How can I get a textview to be able to scroll without the keyboard poping up for edit when clicked on? I am pretty new to iPhone programming and I ve tried several different combinations in Interface ...

Data Entry Form Libraries available for Cocoa Touch?

Does anyone know of any libraries for Objective-C Cocoa Touch that provide data entry fields for all different types of inputs (e.g. Date fields, Boolean, Numbers, Integers, etc). Aside from just the ...

UITextField: move view when keyboard appears

I m currently working on an iPhone application with a single view, which has multiple UITextFields for input. When the keyboard shows, it overlays the bottom textfields. So I added the corresponding ...

self.delegate = self; what s wrong in doing that?

self.delegate = self; what s wrong in doing that? and what is the correct way of doing it? Thanks, Nir. Code: (UITextField*)initWith:(id)sender:(float)X:(float)Y:(float)width:(float)hieght:(int)...

iphone - Get dynamically created UITextField by tag

I add a UITextField to a table cell dynamically in my app. I d like to implement a "backgroundClick" method to dismiss the keyboard if the user presses outside the textfield (and outside the keyboard) ...

热门标签