xcode 7:错误:源文件中的编辑器占位符 [英] xcode 7: error: editor placeholder in source file

查看:299
本文介绍了xcode 7:错误:源文件中的编辑器占位符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在苹果地图上创建一个按钮,如果用户在其他地方导航,它将重新定位用户. 我为ios 7或8找到了解决此问题的一些旧解决方案,这些解决方案在ios 9中不再起作用.这就是我尝试过的

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

@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

推荐答案

我没有解决错误问题,但是我确实意识到让re autolocate按钮起作用很容易.我最初用于获取自动位置的代码只需复制并粘贴到按钮操作括号中,然后在点击时重新运行该代码.

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.

这篇关于xcode 7:错误:源文件中的编辑器占位符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆