지정한 시간 후에 메소드 호출하기.(스크롤 이동)
컴퓨터/아이폰 :
2011. 12. 15. 19:10
//3초후에 스크롤을 이동시키는 메소드 호출,
[self performSelector:@selector(ScrollToItem:) withObject:[NSNumber numberWithInt:mCurrentDataCount] afterDelay:3.0f];
//테이블을 새로 로드된 첫번째 아이템의 위치로 스크롤 시키는 메서드
-(void)ScrollToItem:(NSNumber*)newIndex
{
if(self.mActivities.HasNext){
[self.table_view scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:[newIndex intValue] inSection:0]
atScrollPosition:UITableViewScrollPositionTop animated:YES];
}else{
[self.table_view scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:[newIndex intValue]-1 inSection:0]
atScrollPosition:UITableViewScrollPositionTop animated:YES];
}
self.view.userInteractionEnabled = YES;
}
'컴퓨터 > 아이폰' 카테고리의 다른 글
UIAlertView(경고창) 띄우는 방법과 경고창이 여러개일 때, 이벤트 구별하는 방법 (0) | 2011.12.15 |
---|---|
zBar를 이용하여 바코드 인식하기. (0) | 2011.12.15 |
UINavigationController Customization (title, background color, image, add button) (0) | 2011.12.15 |
동영상 플레이시 "Done"버튼을 "완료"버튼으로 표시 (0) | 2011.12.15 |
웹뷰로 pdf, txt, ppt 파일 열기 (0) | 2011.12.15 |