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

schenker

macrumors newbie
Original poster
Hi, I have an int counter that will get incremented if certain criteria meets. When this counter increments, i want its value to be updated on a uilabel. What is the best way to achieve this? Thanks.
 
Code:
if (statement {
    intName++;
    someLabel.text = [NSString stringWithFormat:@"%i", intName];
}

I think you can even do someLabel.text = intName;
 
Hi, Is it inappropriate to use delegate in this case? Thanks.

Code:
if (statement {
    intName++;
    someLabel.text = [NSString stringWithFormat:@"%i", intName];
}

I think you can even do someLabel.text = intName;
 
Why would you start using delegates, if you barely know how to set text's to labels? 🙂 just wondering..
 
I've near completed my app, but without really exploring delegates much until recently. So, im looking thru my codes to see how i can use delegates to make things work better.

I was just wondering if it would be appropriate to use delegates for the score counter.

Why would you start using delegates, if you barely know how to set text's to labels? 🙂 just wondering..
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.