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

1458279

Suspended
Original poster
May 1, 2010
1,601
1,521
California
I'm setting up a UITableView similar to Apple's Recipes sample project. I'd like to have either an animated graphic and/or to update the text on the record.

Think of the image or text as a clock or alarm timer.

One idea is to set a timer, call an update method that changes the pic and text, then refresh all the displayed records.

I think I can make that work, but don't know if it's the best approach.

Is there a way to have an updating text/pic in the records or does this require writing custom code?

Imagine the Recipes having a clock animation or timer where the food icon is, that's what I'm after.
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
UIImageView can animate through an array of images. This is probably the simplest way to do a clock animation.
 

MattInOz

macrumors 68030
Jan 19, 2006
2,760
0
Sydney
Also it's probably time to look at custom subclass of UITableViewCell.

The cell should be able to animate on its own without updating the table.
 

Duncan C

macrumors 6502a
Jan 21, 2008
853
0
Northern Virginia
I'm setting up a UITableView similar to Apple's Recipes sample project. I'd like to have either an animated graphic and/or to update the text on the record.

Think of the image or text as a clock or alarm timer.

One idea is to set a timer, call an update method that changes the pic and text, then refresh all the displayed records.

I think I can make that work, but don't know if it's the best approach.

Is there a way to have an updating text/pic in the records or does this require writing custom code?

Imagine the Recipes having a clock animation or timer where the food icon is, that's what I'm after.

Do you want clock hands that spin continuously to indicate that something time-consuming is going on, or do you want to draw a graphical clock face that actually shows time of day, elapsed time, or time remaining.

If what you want is spinning clock hands that have no relation to the amount of time passing, I agree with the other poster that a UIImageView animation is the way to go.

If you want clock hands that actually show a meaningful time indicator of some sort, you're going to have to write some fairly complex Core Animation code.
 

1458279

Suspended
Original poster
May 1, 2010
1,601
1,521
California
Do you want clock hands that spin continuously to indicate that something time-consuming is going on, or do you want to draw a graphical clock face that actually shows time of day, elapsed time, or time remaining.

If what you want is spinning clock hands that have no relation to the amount of time passing, I agree with the other poster that a UIImageView animation is the way to go.

If you want clock hands that actually show a meaningful time indicator of some sort, you're going to have to write some fairly complex Core Animation code.
I'm looking at the second one: a graphical clock face that actually shows time of day, elapsed time, or time remaining.
Think of 6 alarms/timers that are for different events, basically the stock timer app is for one timer, this would be for several.
Similar in functionality to this (I don't know if he's got animations or not, the icons all look the same ): http://itunes.apple.com/us/app/multitimer-unlimited-countdowns/id365358824?mt=8
 

Duncan C

macrumors 6502a
Jan 21, 2008
853
0
Northern Virginia
I'm looking at the second one: a graphical clock face that actually shows time of day, elapsed time, or time remaining.
Think of 6 alarms/timers that are for different events, basically the stock timer app is for one timer, this would be for several.
Similar in functionality to this (I don't know if he's got animations or not, the icons all look the same ): http://itunes.apple.com/us/app/multitimer-unlimited-countdowns/id365358824?mt=8

I'd probably create a custom control that did this, using Core Graphics, or maybe UIBezierPath objects. It would have a setting for the type of display (count down timer, clock, stopwatch) and take either a time interval or an NSDate, and draw itself based on the setting. I'd then set up a timer that broadcast a notification periodically, and all the clock controls would update themselves when they received that notification.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.