简体   繁体   中英

let user adjust region to be monitored

I would like to let a user to adjust a region to be monitored like the iOS 7 reminder app as shown on the attached image bellow.

I have created a rigion like:

CLRegion *newRegion = [[CLRegion alloc] initCircularRegionWithCenter:regionAnnotation.coordinate radius:100.0 identifier:[NSString stringWithFormat:@"%f, %f",regionAnnotation.coordinate.latitude, regionAnnotation.coordinate.longitude]]; regionAnnotation.region = newRegion;

Do we have a public api to let the user adjust the radius of this region?

在此处输入图片说明

These sorts of things are usually easier if you don't think about the user control as part of the map. Instead, disable interaction with the map or put a transparent view over it, then show your control above that. Respond to changes in the control by adjusting the map programmatically. You can also make use of MapKit API for doing the pixel-to-distance conversions that are necessary for this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM