我从调试器得到了这个结果.我该怎么解决这个问题?
(lldb)po scrollView.contentOffset.y
错误:: 1:1:错误:为运营商找到了不明确的运营商声明
scrollView.contentOffset.y发现这个匹配的运算符声明了这个匹配的运算符声明:1:1:错误:运算符不是已知的二元运算符scrollView.contentOffset.y ^:9:9:警告:变量'$ __ lldb_error_result'的初始化从未用过的; 考虑将赋值替换为'_'或删除它var $ __ lldb_error_result = __lldb_tmp_error
:14:8:错误:为运营商找到了模糊的运营商声明
if(1 == 1){
发现此匹配运算符声明此匹配运算符声明:14:8:error:运算符不是已知的二元运算符
if(1 == 1){
我需要调用UIScrollViewDelegate我不知道如何创建UnsafeMutablePointer对象的方法.
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
}
Run Code Online (Sandbox Code Playgroud) 如何创建MKCoordinateRegion.
NSString *latitudeString = [locationString substringToIndex:startRange.location];
NSString *longtitudeString = [locationString substringWithRange:NSMakeRange(startRange.location+2,((endRange.location-1)-(startRange.location+2)))];
CLLocationCoordinate2D coord = CLLocationCoordinate2DMake((int)latitudeString, (int)longtitudeString);
MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance(coord, 500, 500);`
Run Code Online (Sandbox Code Playgroud)
我收到错误" 无效区域中心:+392128672.00000000,+ 392128704.00000000范围:+0.00448287,-0.01195557 "