2011-01-19 5 views
1

나는 계속해서 움직이는 길을 만들고 싶다는 간단한 앱을 만들고 싶다. 어떻게해야합니까?계속해서 뷰를 계속 이동할 수 있습니까?

+2

당신은 CPT에서 남용하는 경우 : 그런 다음 실행되는 NSTimer를 설정합니다. Capslock, 그는 당신을 저주 할 것이고 당신은 응용 프로그램을 만들 수 없을 것입니다. 사실, 많은 사람들이 이미 저주의 고통을 겪었고, 그들은 한 줄의 코드를 작성하지 않았습니다. – JustSid

+0

고르면 고정. 귀마개가 제거되었습니다. –

답변

1

저는 UIScrollView를 사용했습니다. 이 도움이


-(void)scroll{ 
    CGPoint currentPoint = playerStatsRect.contentOffset; 
    CGPoint scrollPoint = CGPointMake(currentPoint.x, currentPoint.y + 1); 
    [playerStatsRect setContentOffset:scrollPoint animated:NO]; 

    if(scrollPoint.y == playerStatsRect.contentSize.height+5)//If we've reached the bottom, reset slightly past top, to give ticker look 
    { 
     [playerStatsRect setContentOffset:CGPointMake (0,-125)]; 
    } 
} 

희망 :

관련 문제