xcode 7:错误:源文件中的编辑器占位符
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33088305/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
xcode 7: error: editor placeholder in source file
提问by RubberDucky4444
I am trying to create a button on apple maps that will relocate the user if he or she navigates elsewhere. I found some old solutions to this problem for like ios 7 or 8 which no longer worked in ios 9. This is what I tried
我正在尝试在苹果地图上创建一个按钮,如果用户导航到其他地方,它将重新定位用户。我找到了一些解决此问题的旧解决方案,例如 ios 7 或 8,它们在 ios 9 中不再有效。这就是我尝试过的
@IBAction func locateMe(sender: AnyObject) {
self.mapView.setUserTrackingMode(MKUserTrackingMode, animated: true)
}
there are no errors before I try to run it but when I do it says: editor placeholder in source file
在我尝试运行它之前没有错误但是当我运行它时说:源文件中的编辑器占位符
采纳答案by RubberDucky4444
I didn't solve the bug issue, But i did realize how easy it was to get the re auto locate button to work. The code that I used to initially get the auto location just needs to be copied and pasted into the button action brackets and will rerun the code when tapped.
我没有解决错误问题,但我确实意识到让重新自动定位按钮起作用是多么容易。我最初用于获取自动位置的代码只需要复制并粘贴到按钮操作括号中,然后在点击时重新运行代码。