0
UICollectionView
에 셀에 카운트 다운 타이머를 구현하고 웹 서비스에서 시간을 얻었지만 다시 돌아올 때 정적 시간이 표시됩니다. UICollectionView
왼쪽 웹 서비스 시간에 따라 클래스 시간이 줄어 듭니다.UICollectionViewCell에서 라이브 타이머를 사용하는 방법은 무엇입니까?
그러나 나는 그것이 1 초로 감소 할 때마다 그것을 보여주고 싶습니다. 어떤 도움이라도 인정됩니다.
내 코드 :
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell
{
let cell = collectionView.dequeueReusableCellWithReuseIdentifier("cell", forIndexPath: indexPath) as! ManageObjectCollectionViewCell
revealTime = getRevealtime[indexPath.section].objectAtIndex(indexPath.row) as! Int
minutes = revealTime/60
seconds = revealTime % 60
cell.HourLabel.text = "0"
cell.MinLabel.text = NSString(string: "\(minutes)") as String
cell.sec.text = NSString(string: "\(seconds)") as String
}
정말 취소합니다. 예를 들어 설명해 주시겠습니까? – Shubhank
업데이트가 필요할 때 (웹 서비스에서 새로운 시간을 가져 오거나 이미 가지고있는 정보를 기반으로 계산할 때) 'NSTimer' 객체 또는 다른 타이머를 트리거 할 수 있습니까? 새로운 시간을 가져 오면 지정된 색인에서 셀을 다시로드하거나 필요에 따라 모든 셀을 다시로드합니다. – DJohnson