I wasn't sure about evaluating like that (value[0] = 2) or if I'd need to convert it to something first. I've never used uint8_t before.
Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki On Tue, Jan 7, 2014 at 1:54 PM, Jens Alfke <j...@mooseyard.com> wrote: > > On Jan 7, 2014, at 10:22 AM, Eric E. Dolecki <edole...@gmail.com> wrote: > > How can I adjust that if else statement properly to evaluate the data sent > to the iOS application over BLE? > > I'm in unchartered territory here. Is it something like the below? I'm > thinking no... > > > The code you put below looks fine, though I’d go with a switch statement > instead; it’s cleaner. > No offense, but this looks really straightforward to me. What about it is > confusing you? The if/else syntax? The byte value in the NSData? The button > logic? > > —Jens > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com