-2
我已经添加了这些代码来滚动内容到滚动视图,而不是内容我的滚动视图fram正在从右向左和各自的移动。 我的代码是在这里.. 我想将内容滚动到按钮上的滚动视图点击
-(IBAction)leftbtnclick:(id)sender
{
NSLog(@"left clicked");
CGRect basketTopFrame = nameContainerScrollView.frame;
basketTopFrame.origin.x = 115;
[UIView animateWithDuration:0.3 delay:0.0 options:UIViewAnimationOptionCurveEaseIn animations:^{ nameContainerScrollView.frame = basketTopFrame; } completion:^(BOOL finished){ }];
}
-(IBAction)rightbtnclick:(id)sender
{
NSLog(@"right clicked");
CGRect napkinBottomFrame = nameContainerScrollView.frame;
napkinBottomFrame.origin.x = 0;
[UIView animateWithDuration:0.3 delay:0.0 options: UIViewAnimationOptionCurveEaseOut animations:^{ nameContainerScrollView.frame = napkinBottomFrame; } completion:^(BOOL finished){/*done*/}];
}