<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Realized that after sending. I'll file a radar. Thanks!<br><br>Sent from my iPhone</div><div><br>On Jan 1, 2017, at 4:03 PM, Dan Stenmark <<a href="mailto:daniel.j.stenmark@gmail.com">daniel.j.stenmark@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div class="">Swift-evolution is for talking about the core language and its standard libraries (String, Array, Optional, etc), not high level frameworks like MapKit. For that, you'll want to file a Radar at <a href="http://bugreport.apple.com/" class="">http://bugreport.apple.com/</a>.</div><div class=""><br class=""></div><div class="">Dan</div><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 1, 2017, at 11:02 AM, Scott Gardner via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello Swift Community, and…<div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(112, 61, 170);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2" class="">if</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">Calendar</span><span style="font-variant-ligatures: no-common-ligatures;" class="">.</span><span style="font-variant-ligatures: no-common-ligatures" class="">current</span><span style="font-variant-ligatures: no-common-ligatures;" class="">.</span><span style="font-variant-ligatures: no-common-ligatures" class="">identifier</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #3e1e81" class="">==</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> .</span><span style="font-variant-ligatures: no-common-ligatures; color: #3e1e81" class="">gregorian</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> {</span></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #3e1e81" class="">print</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(</span><span style="font-variant-ligatures: no-common-ligatures" class="">"Happy new year! </span><span style="line-height: normal; font-family: 'Apple Color Emoji'; font-variant-ligatures: no-common-ligatures;" class="">🎉</span><span style="font-variant-ligatures: no-common-ligatures" class="">"</span><span style="font-variant-ligatures: no-common-ligatures;" class="">)</span></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">}</span></div><div class=""><br class=""></div><div class="">I would like to propose that the MapKit framework functions be updated to conform to the Swift API Design Guidelines.</div><div class=""><br class=""></div><div class="">For example, this is how you would currently determine if the user is currently within the visible map view:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures" class=""> userPoint = MKMapPointForCoordinate(mapView.userLocation.coordinate)</span></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures" class=""> mapRect = mapView.visibleMapRect</span></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures" class=""> inside = MKMapRectContainsPoint(mapRect, userPoint)</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class="">This should be more easily accomplished, such as by doing this:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures" class=""> userPoint = mapView.userLocation.coordinate.mapPoint</span></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures" class=""> inside = mapView.visibleMapRect.contains(userPoint)</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class="">There are 39 functions that should be updated:</div><div class=""><br class=""></div><div class=""><a href="https://developer.apple.com/reference/mapkit/1612565-mapkit_functions?language=swift" class="">https://developer.apple.com/reference/mapkit/1612565-mapkit_functions?language=swift</a></div><div class=""><br class=""></div></div><div class="">I realize that this proposal is out of scope for Swift 4. So I will develop it for consideration in a future release, and keep it updated on my fork until it’s ready to submit. All feedback welcomed and appreciated.</div><div class=""><br class=""></div><div class=""><a href="https://github.com/scotteg/swift-evolution/blob/master/proposals/mapkit-functions-for-swift-api-design-guideines.md" class="">https://github.com/scotteg/swift-evolution/blob/master/proposals/mapkit-functions-for-swift-api-design-guideines.md</a></div><div class=""><br class=""></div><div class="">Cheers,</div><div class=""><div class="">Scott</div><div class=""><br class=""></div><div class="">--</div><div class="">Scott Gardner</div><div class=""><a href="https://github.com/scotteg" class="">https://github.com/scotteg</a></div><div class=""><a href="http://scotteg.com/" class="">scotteg.com</a></div><div class=""><a href="https://twitter.com/scotteg" class="">@scotteg</a></div></div><div class=""><br class=""></div></div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class=""></div></blockquote></body></html>