A call to a webservice returns to me a byte[] which I would like to display in word format on the iphone.
How can I achieve this? Which view i can use to display the view?
Please provide co开发者_JAVA技巧de samples if possible. Thanks in advance. Please answer as soon as possible.
It kind of depends on what is in the byte[] but assuming they have sent you some string (in ASCII or UTF8 etc) then call use the following init method to init a NSString:
- (id)initWithBytes:(const void *)bytes length:(NSUInteger)length encoding:(NSStringEncoding)encoding
You'll need to know the encoding they've used, I'd try 'NSASCIIStringEncoding' and 'NSUTF8StringEncoding' first, but it should be documented somewhere as well.
精彩评论