ios - textview text into array -


i want paste data text view, , want information placed array. @ moment need do, later on i'm looking place data tableview. if can me appreciated.

thank you

you can split string textview using

nscharacterset *separator = [nscharacterset newlinecharacterset]; nsarray *dataarray = [textviewstring componentsseparatedbycharactersinset:separator]; 

eg. text pasted

line 1 line 2 line 3 

result array contain

[@"line 1",@"line 2",@"line 3"]


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -