2016-12-26 2 views

답변

0

타이머를 만들고 타이머에 의해 호출 된 함수 내에서 필요한 변경을하십시오. var 타이머 : 타이머! timer = Timer.scheduledTimer (timeInterval : 5.0, target : 셀렉터 : #selector (self.countDown), userInfo : nil, repeats : true);

0
var getLocationtimer:Timer = Timer()  
self.getLocationtimer = Timer.scheduledTimer(timeInterval: 5, target:self, selector:#selector(YOUR_VIEW_CONTROLLER.updateLevel), userInfo:nil, repeats:true) 
func updateLevel(){ 
    //Update label your here 
} 

이 타이머는 시도하고있는 것을 달성하는 데 도움이 될 수 있습니다.

+0

예. 다른 문장을 반복하는 루프 – yousefffa

+0

예를 들어 updatelevel() 메소드의 논리에 따라 처리 할 수 ​​있습니다. –

관련 문제