Cocoa is Apple's application-development framework for OS X, consisting of Foundation, Application Kit, and Core Data.

learn more… | top users | synonyms

5
votes
2answers
226 views

Is this a decent first Objective-C project, and can others learn from it?

This isn't my first time coding in Objective-C, but I do sometimes fantasize about there being a de facto standard "practice" project. I'm toying around with this code, and I'd like your input. ...
5
votes
1answer
256 views

Presenting modal dialogs from XIB in Cocoa: best/shortest pattern?

Below is my typical WindowController module for presenting a modal dialog (could be settings, asking username/password, etc) loaded from a XIB. It seems a bit too complex for something like this. Any ...
2
votes
1answer
305 views

Reviewing C function which captures the screen

I have created a function in C on OSX in Xcode which captures the screen, adds the mouse pointer to the image, rescales the image to fit a certain width X height requirement, and puts the rescaled ...
3
votes
1answer
81 views

Is there a better way to make sure a variable is initialized when using blocks?

I have a method to provide an NSManagedObjectContext using UIManagedDocument. I need to ensure that the ...
-3
votes
1answer
276 views

iOS multiplayer pong game [closed]

I was trying to make a multiplayer Pong iOS app and ended up with this. It is almost good, except for one big bug. The 2nd player's paddle is moving the same way with yours. Basically, you're ...
3
votes
1answer
491 views

Spliting string to array by number

I have two functions to split string to array of strings. Input string is: (1Letter E|V|R) + 8 number, last component of string (1Letter + V) + 8 or less numbers. I'v got two functions advised to ...
3
votes
2answers
236 views

Storing and iterating over multiple NSError pointers

How would you refactor this kind of code? I've unsuccessfully tried several approaches (NSArray, NSPointerArray, plain C array), but always ran into pointer type checking error. ...
2
votes
4answers
383 views

Is there anything wrong with this unusual NSMutableArray setter?

This behaves to an outside observer mostly like @property (copy), except it has the very nice property of automatically performing any side effects that may exist ...
3
votes
1answer
192 views

How could this constructor code be improved?

How could this constructor code be improved? I feel like I'm not doing something optimally here... ...
2
votes
1answer
244 views

Can this game function/code be better?

I'm working on a game for iOS devices and this is the function we use to create server-loaded buildings. The server loading is in another function and everything works just fine, but I was wondering ...
3
votes
1answer
417 views

Is this OK Cocoa OpenGL design? What could I be doing better?

I'm working on a Cocoa project that uses OpenGL. I'm trying to keep things easily cross-platformable for later (which is the primary reason for my GL singleton; I hope to implement Linux versions of ...