iphone - multiple regionDidChangeAnimated calls - what gives? -
i have mkmapview inside uitableview custom cell (don't ask ;) - don't know if matters really), register regiondidchangeanimated delegate method. method gets called 3 times when uitableview loaded - once actual region , 2 more times region way off. in simulator, consistently region center (+37.43997405, -97.03125000). on device, seems depend on location reported location manager, initializes map view.
why getting 3 regiondidchangeanimated calls? , why center coordinates last 2 of them off?
this code use center coordinates:
- (void)mapview:(mkmapview *)mapview regiondidchangeanimated:(bool)animated { cllocation *l = [[cllocation alloc] initwithlatitude:self.mapview.centercoordinate.latitude longitude:self.mapview.centercoordinate.longitude]; (....)
i have set map view inside custom table view cell , added cell table view (although should not matter where/how map view displayed).
i not see unexpected calls regiondidchangeanimated:
delegate method.
i see calls method when:
- the user changes position/zoom of map, or
- some code changes center/span of map
are sure seeing unexpected calls? not using code setup region (center/span) of map?
Comments
Post a Comment