Here I have following code, trying to change the value of targetContentOffset, however I only got the println() working, view still not changed after I set offset
func scrollViewWillEndDragging(scrollView: UIScrollView!, withVelocity velocity: CGPoint, targetContentOffset: UnsafePointer<CGPoint>) {
println( "got something" )
targetContentOffset.memory.x = 200
targetContentOffset.memory.y = 200
}
update:
I am able to scroll the view automatically when I did following. However when I set animated to true it doesn't work.
func scrollViewWillEndDragging(scrollView: UIScrollView!, withVelocity velocity: CGPoint, targetContentOffset: UnsafePointer<CGPoint>) {
targetContentOffset.memory = CGPointMake( CGFloat( 156.0 ) , CGFloat( 0.0 ) )
scrollView.setContentOffset( CGPointMake( CGFloat( 156.0 ) , CGFloat( 0.0 ) ), animated: false )
}