How to create UnsafeMutablePointer<CGPoint> Object in swift
问题 I need to call the UIScrollViewDelegate methods I don't know how to create UnsafeMutablePointer object. let pointer:UnsafeMutablePointer<CGPoint> = CGPoint(x: 0, y: 1) as! UnsafeMutablePointer<CGPoint> self.scrollViewWillEndDragging(self.collectionView, withVelocity: CGPoint(x: 0, y: 1), targetContentOffset: pointer) func scrollViewWillEndDragging(scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) { //Some code here } 回答1: import