开发者

Iphone displaying the data in word format

开发者 https://www.devze.com 2023-02-22 07:06 出处:网络
A call to a webservice returns to me a byte[] which I would like to display in word format on the iphone.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消