Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Question about Buffer from Obj-c and Titanium

$
0
0

Hi, I have the following obj-c code:

uint8_t data = 0x01;
as function parameter is used
data:[NSData dataWithBytes:&data length:1]
On titanium I translated with:
var buffer = Ti.createBuffer({value: 0x01, length: 1, type: Ti.Codec.TYPE_BYTE});
but I didn't receive the same output. obj-c output is 01, and my titanium buffer is 1

Where am I missing? How can pass the same parameter?

Many thanks


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>