새로운 뷰를 표시하기 위해 스 와이프 할 수있는 UIScrollView가 있습니다. 프로그램 적으로보기를 스크롤하려는 버튼이 있습니다. 한 번 클릭하면 다음보기로 스크롤됩니다. 어떻게 구현할 수 있습니까? 여기 프로그래밍 방식으로 UIScrollView를 스크롤하는 방법은 무엇입니까?
스크롤 뷰에 첨가
myView
가정하고있는 ScrollView 코드
- (void)scrollViewDidEndDecelerating:(UIScrollView *)aScrollView
{
NSUInteger offset = aScrollView.contentOffset.x;
NSUInteger width = aScrollView.contentSize.width;
int anIndex = (offset == 0) ? 0 : (int)(width/(width - offset));
selectedDeal = [deals objectAtIndex:(anIndex > [deals count]- 1 ? [deals count]- 1 : anIndex)];
}
이 코드와 질문의 관계는 무엇입니까? – taskinoor