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

cathy88

macrumors member
Original poster
Aug 11, 2009
95
0
Hey guys,

I am trying to make a simple app (for testing purposes) to count down from 60 seconds to 0 and every second I will store a value into some NSMutableArray. Also the UI needs to update the second and need to be threaded as I will potentially do other things will the clock is running.

Here is my current solution, I am using Grand Central Dispatch (relatively straight forward) and in the block of the code I set up a NSTimer of 1 second interval. For every one second I decrement the "seconds" variable and update the display.

To me this feels a little weird, I was wondering if there are any better way of making a clock?

Also say I created a button to stop the clock before it reaches 0 seconds, I can do this by [timer invalidate], but I am unsure if GCD thread would be still there or not?

When creating apps, how would Xcode know if this will run on Retina or non Retina displays? The area of the xib file seems to be fixed unchangeable (and shows a resolution of the old display)?

Last question, where can I find the image for the iOS5 Notification Centre Background (the grey one which has lines through it). Ive looked all over the internet just cant find it at all.

Thanks
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.