Die addTarget Aktionen können wir auf uns nehmen, UITextView?

Will ich mit addTarget:action auf UITextView wie auf (UITextField-oder UIButton).

Ich möchte eine Methode aufrufen, die auf UITextView.

bitte geben Sie einige mögliche Lösung...

Danke...

UITextView  *TXT_First_Tag = [[UITextView alloc] initWithFrame:CGRectMake(5, textPosY, 350, 65)];
TXT_First_Tag.backgroundColor = [UIColor whiteColor];
TXT_First_Tag.font = [UIFont fontWithName:@"Arial-BoldMT" size:30.0];
TXT_First_Tag.editable =YES;
TXT_First_Tag.tag = i; 
TXT_First_Tag.textColor = [UIColor blackColor];


[TXT_First_Tag addTarget:self action:@selector(C6Loop) forControlEvents:UIControlEventEditingDidEnd]; // This Line I want to use, it's working fine on textfield...
[scrollview addSubview:TXT_First_Tag];
  • Ich weiß, diese Frage ist alt, aber ich dachte, ich hätte auf die Tatsache hinweisen, dass die addTarget:action:forControlEvents: Methode geerbt wird in UITextField und UIButton aus UIControl. Die UITextView Erben nicht von UIControl. Also die Antwort auf die Frage im Titel ist keine.
Schreibe einen Kommentar