需要在这两者之间添加暂停/等待功能.
myscore += [self getcard]; myscore += [self getcard];我没有看到Objective-c的这样一个函数,但是我使用了一个NSTimer,它在你决定的时间间隔内调用给定的函数.
http://developer.apple.com/iphone/library/documentation/cocoa/reference/foundation/Classes/NSTimer_Class/Reference/NSTimer.html
更具体地说,使用函数scheduledTimerWithTimeInterval:target:selector:userInfo:重复:为我做.时间间隔是以秒为单位,每次滴答之间的“睡眠”时间,目标是持有应该调用的函数的类,选择函数.
scheduledTimerWithTimeInterval:1 // Ticks once per second target:myObject // Contains the function you want to call selector:@selector(myFunction:) userInfo:nil repeats:YES
精彩评论