CMutablePointer – how to access it?

As @Eric mentioned in his update, the scrollViewWillEndDragging delegate now takes an UnsafePointer. To update the Unsafe pointer, you just have to access the memory property.

func scrollViewWillEndDragging(scrollView: UIScrollView!, withVelocity velocity: CGPoint, targetContentOffset: UnsafePointer<CGPoint>) {
    targetContentOffset.memory.y = x + 1
}

*Tested and working with Swift Beta 4.

UPDATED FOR BETA 5
Swift Beta 5 scroll view delegate uses an UnsafeMutablePointer instead of UnSafePointer

func scrollViewWillEndDragging(scrollView: UIScrollView!, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {
    targetContentOffset.memory.y = x+ 1
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)