objective c - How to read, separate, and use input data -
i'm trying develop ios app act gui telnet session. have gotten nsstream
coding work (mostly) , i'm trying figure out how create events based on code results. think way examine results , run "predicate" on them. simple example below:
i press button sends command, example command:
"info"
the server sends response (which i'm snagging , writing in nslog
):
version: 1.1.1
model: xyzabc
whatever: whatever
etc: etc..
how able pull information, read it, , take "1.1.1" or "xyzabc" , add label in vc?
i don't need basics of how add label, how strip correct information , stick values nsstring.
thanks in advance,
chuck (total ios coding noob)
(edit, code added):
if (nil != output) { nslog(@"%@", output); [self messagereceived:output]; _txtlabel = output; -(void)messagereceived:(nsstring *)message { [_messages addobject:message]; }
_txtlabel nsstring _messages nsmutablearray
oh, , nslog looks when comes in, not sure if relevant..:
2014-06-27 15:22:07.930 multiscenetest[37480:60b] version: 1.1.1 2014-06-27 15:22:07.930 multiscenetest[37480:60b] model: xyzabc 2014-06-27 15:22:07.931 multiscenetest[37480:60b] whatever: whatever
Comments
Post a Comment