The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
1answer
55 views

Simple yet efficient integer-to-object dictionaries?

Sometimes I need an NSDictionary-like object that maps a few integers (non-negative) to objects. At first glance, NSMutableArray is great for this, provided that the indexes aren't too high so I came ...
1
vote
1answer
79 views

Logic question in a card matching game controller

I have a card matching game with a model of: -Card -Deck -PlayingCard -PlayingCardDeck And another model that called CardMatchingGame. Now, I had a task to add a button to the view for new game, ...
-1
votes
1answer
51 views

iOS multiplayer pong game [closed]

Okay so I was trying to make a multiplayer Pong iOS app and ended up with this. Which is almost good except for one big bug. the 2nd player's paddle is moving the same way with yours. basically you're ...
2
votes
1answer
80 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 ...
2
votes
2answers
87 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. NSError *error1; ...
4
votes
1answer
85 views

iOS: Upgrade this animation code

I understand that this animation code is outdated: [UIView beginAnimations:@"Move" context:nil]; [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; [UIView setAnimationDelay:0.08]; ...
2
votes
0answers
318 views

iOS: Parsing NSDictionary from NSJSONSerialization

playerObject is an NSDictionary from JSONObjectWithData:options:error: I'm trying to update a CoreData entity. My code looks like this: if ([results count] > 0) { newPlayer = (Player ...
2
votes
4answers
208 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 in remove<Key>AtIndexes: and ...
3
votes
1answer
163 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... @interface JGProduct : NSObject { NSString *identifier; } +(JGProduct ...
2
votes
1answer
207 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
357 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 ...