Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
83 views

Refactoring Help - Objective-C / Blocks

I have found that writing unit tests helps me to discover both the intent and also reusability of code that I'm working on. It has been generally helpful in helping develop my "code smell." I was ...
0
votes
1answer
41 views

Objective C if problem [closed]

Someone help me with this code it's not really working right now. Everything below the not working comment to the end of the action never gets called. I would love if some one could shine some light ...
2
votes
2answers
65 views

Standard delegate methods

I'm aware standard delegate method declaration should include the object that triggers the method, usually of the class that declared the protocol. That's fine when the delegate method includes ...
1
vote
1answer
57 views

Releasing retained objects inside dealloc

When releasing objects that might have been retained during the app's lifetime, how do you check if the object really exists and prevent releasing a nil object? Here's how I'm doing it: - ...
2
votes
2answers
64 views

Beginner to OOP: Objective-C class to handle fractions

I am very new to Objective-C as well as objected oriented programming, and in a book I am studying from there is an exercise in which I was supposed to create a class called Rational, that has hidden ...
5
votes
1answer
170 views

Review of my code: Tic Tac Toe in Objective-C

I am completely new to Objective-C. I have written a simple SingleView Tic Tac Toe Application application for learning purposes. While writing the app I tried to be as much sound as I could, but ...
2
votes
4answers
74 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 ...
2
votes
3answers
167 views

Shorten This Code with… blocks?

I think this code cannot be shortened much, especially because I only consider two cases. But maybe there's a language construct that I don't know that would help. if (subControl.inverted) { ...
1
vote
1answer
125 views

Objective-C debug macros

I'm looking for a review of my macros. I have these in the project pre-compile header. I tent to copy them into all my new projects as well, unless its a very simple project. #ifdef __APPLE__ ...
0
votes
1answer
74 views

code review on the given method

+(NSArray *)stampImages{ UIImage *image1 = [UIImage imageNamed:@"abcd.png"]; UIImage *image2 = [UIImage imageNamed:@"fron.png"]; UIImage *image3 = [UIImage ...
2
votes
1answer
93 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 ...
0
votes
0answers
69 views

Displaying Text in a Custom View Over An Polynomial Graph

I am writing a custom UIView that should display some text its top. There is already a polynomial graph with axes drawn in the view, so I I decided to fill a white rectangle and add a black line at ...
1
vote
2answers
620 views

iOS4 alternatives for dismissViewControllerAnimated:completion:

My inspiration for creating this protocol came from iOS 5's "dismissViewControllerAnimated:completion:" addition to UIViewController. I wanted this functionality in iOS 4.3. I find using the modal ...
1
vote
1answer
116 views

I'm looking for optimisations to this method

I'm looking to speed up this method, ideally I would like to cut the time in 1/2 or more. At the moment I have to draw the screen line-by-line as the font is 16 pixels high, but it is being drawn with ...
2
votes
2answers
197 views

RPN-Stack-Based Recursive Calculator Needs Tuneup

This function takes an array of strings and numbers and recursively processes it as a kind of "calculating program." The structure is based on Reverse Polish Notation, so the top object in the stack ...

1 2 3 4
15 30 50 per page