Showing posts with label Objective-C. Show all posts
Showing posts with label Objective-C. Show all posts
Friday, November 22, 2013
Online Session Code for Big Objects (Plus a Warning)
During Chapter 9 of extra iPhone Development, we wrote a usual of classes to facilitate mimicked the behavior of GameKit's peer-to-peer connectivity, but representing regular interact contacts (GameKit's single factory with BlueTooth and native interact connections).
Thursday, November 21, 2013
CGAffineTransform Additions
To the same extent you probably know, Apple provides a bunch of functionality representing manipulating objects in 2D universe using CGAffineTransform. Oddly, Apple doesn't provide you with a way to extract the degree, transform, and rotation in sequence from a CGAffineTransform and they don't provide several shearing functionality next to all.
Sunday, September 29, 2013
Modern ABI & No More @Synthesize
I haven't talked about one of my favorite new features of Xcode 4 and LLVM, because I wasn't sure of the NDA status. However, the cat's out of the bag now, so I feel like it's safe to mention. The iPhone Simulator in Xcode 4 now uses the Modern ABI (yet it's still correctly uses 32-bit datatypes!), so we can use synthesized instance variables in our iPhone applications and use the simulator. On top of that, if you choose to use LLVM instead of GCC, one of the (many) benefits you'll get is that @synthesize declaration is now assumed. If you don't need to specify anything on the @synthesize declaration (like a different setter or getter name) and your property isn't @dynamic, you can justleave it off. This feature isn't turned on by default (yet), but see Pilky's blog post for instructions on enabling this feature.
Synthesize by Default
So, in my previous post, I told you I was excited about the "synthesize by default" functionality that's now available in LLVM 1.5. And I am, very much so. But it turns out there's a caveat that tempers my excitement at the moment.
With synthesized iVars, we've had direct access to the underlying synthesized variable for a while now, so if you created a class like this:
With synthesized iVars, we've had direct access to the underlying synthesized variable for a while now, so if you created a class like this:
Subscribe to:
Posts (Atom)