ios - How to display objects with sound sequentially, preferably with timing? -
xcode 5, ios 7
i'm trying create/display several objects sequentially, sound, , preferably specified timing.
for example, i'd create , display 10 labels. - each time label created, play sound. - control display of label (i.e. animation block timing) - create next label after previous 1 has been created, sound played, , displayed. preferably insert delay between labels.
what have loop calls 1: method - instantiate label 2: method calls method b contains animation block a)play sound b)animate display
my problem 10 labels appear fast doesn't sequential , hear sound once.
how can chain these , control display , timing?
if aren't using spritekit, close looking for:
-(void)managermethod { float timebetweenevents = 3.0; (int = 0; < 10; i++) { nsobject *someobjectcreatedhere; [self performselector:@selector(dosomethingbasedonthisobject:) withobject:someobjectcreatedhere afterdelay:(i * timebetweenevents)]; } } -(void)dosomethingbasedonthisobject:(nsobject*)thisobject{ //do stuff thisobject //load stuff thisobject //etc }
Comments
Post a Comment