• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
UILabel updating from a button click
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UILabel updating from a button click


  • Subject: UILabel updating from a button click
  • From: Michael Davey <email@hidden>
  • Date: Sun, 21 Feb 2010 15:33:31 +0000

Hi,

I have, for a bit of fun, taken my first steps out of Mac development and into iPhone development, and have encountered a bit of a problem.

Basically, what I want to do is update a UILabel when a button is clicked in the view, but I want to be able to update it in intervals with different values.  I have tried basically doing this (although this is simplified for the purposes of demonstration) in the IBAction for the button click event:

for (int i = 0; i < 10; ++i) {
	label.text = [stringList objectAtIndex:i];
	sleep(1);
}

What happens is that I only see the last value that is set - does anyone here know what I should be doing to code this correctly?

Mikey_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: UILabel updating from a button click
      • From: Luke the Hiesterman <email@hidden>
  • Prev by Date: Re: setAction:@selector is not working ?
  • Next by Date: Re: UILabel updating from a button click
  • Previous by thread: Problem with one-way Core Data relationship not persisting
  • Next by thread: Re: UILabel updating from a button click
  • Index(es):
    • Date
    • Thread