Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tazboy

macrumors newbie
Original poster
Apr 6, 2010
8
0
I've searched here but I was not able to find a solution.

I'm trying this:
Code:
NSInteger *sum;
@property (assign) NSInteger *sum;
@synthesize sum;

Code:
sum = [First1Total.text integerValue] + [First2.text integerValue];
First2Total.text = [sum stringValue];

I'm obviously not doing this correctly. Does anyone have any ideas on how to get this to work?

Thanks for any help.
 
Thanks for the help. I also had to change something else. Here is my code that works:

Code:
sum = [First1Total.text integerValue] + [First2.text integerValue];
First2Total.text = [NSString stringWithFormat:@"%d", sum];
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.