How can I add a clear button (cross inside a circle) for UITextView like UITextField has?
just make a uibutton and put it on uitextview and set its action for clear text view;
uitextview.frame = (0,0,320,416);
uibutton.frame = (310,0,10,10);
[uibutton setimage:@"cross.png" forcontrolstate:uicontrolstatenoraml];
[uibutton addTarget:self action:@selector(clearButtonSelected:) forControlEvents:UIControlEventTouchUpInside];
-(void)clearButtonSelected{
uitextview=@"";
}
hope you want to clear the text view text when you click on cross button above is help if not understand then i can send you proper program for that
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With