ios - Thread 1 exc_bad_access Error -
i developing ios app , working google maps. drawing lines on map, add coordinates in mutablearray, save coordinate in nsuserdefault works perfectly. when getting data nsuserdefault , showing coordinates on google maps not work. in gmsmutablepath, app crashes following error message : exec_bad_access (code=1,address=0*4)
. any idea why?
here related code:
getting data
nsuserdefaults *defaults=[nsuserdefaults standarduserdefaults]; nsarray *coordinatearray = [defaults objectforkey:@"numberarray"]; nslog(@"%@",coordinatearray (int = 0; < [coordinatearray count]; i++) { nsdictionary *dic = [coordinatearray objectatindex:i]; nsstring *lat = [dic valueforkey:@"lat"]; nsstring *longitude = [dic valueforkey:@"long"]; _valuepoints.latitude = [lat doublevalue]; _valuepoints.longitude = [longitude doublevalue]; gmsmutablepath *path = [[gmsmutablepath alloc] initwithpath:self.polyline.path]; [path addcoordinate:_valuepoints]; self.polyline.path = path; }
Comments
Post a Comment