The common method of Uitextview is mainly used to enter and display multiline text information uitextview *onetextview = [[Uitextview alloc] init];onetextview.frame = CGRectMake (0, 20, 320, 200); Set position Onetextview.backgroundcolor = [Uicolor Whitecolor]; Set Background color Onetextview.alpha = 1.0; Set Transparency Onetextview.text = @ "18331000747[email protected] [email protected] Www.baidu.com "; Set text onetextview.textalignment = Nstextalignmentcenter; Set the font to its way Onetextview.font = [Uifont boldsystemfontofsize:25.5f]; Set Font Size Onetextview.textcolor = [Uicolor Redcolor]; Set text color [Onetextview Seteditable:yes]; Set time can be edited onetextview.datadetectortypes = Uidatadetectortypeall; Display the connection mode of the data type (e.g. phone number, URL, address, etc.) Onetextview.keyboardtype = Uikeyboardtypedefault; Sets the type of pop-up keyboard onetextview.returnkeytype = Uireturnkeysearch; Sets the type of Returen key on the keyboard onetextview.scrollenabled = YES; Whether to allow sliding [self.view Addsubview:onetextview] When the text width exceeds the width of uitextview; Add to view [Onetextview release], Onetextview = nil; Free memory //Several common proxy methods//will start editing//-(BOOL) textviewshouldbeginediting: (Uitextview *) textview;//will end edit//-(BOOL) Textviewshouldendediting: (Uitextview *) textview;//start editing//-(void) textviewdidbeginediting: (Uitextview *) textView;// End Edit//-(void) textviewdidendediting: (Uitextview *) textview; //content is going to change edit//-(BOOL) TextView: (Uitextview *) TextView Shouldchangetextinrange: (nsrange) RANge Replacementtext: (NSString *) text;//content changed edit//-(void) Textviewdidchange: (Uitextview *) textview;//focus changed//-(void ) Textviewdidchangeselection: (Uitextview *) textview;
On-Attack UI---------------------Uitextview (text box)