自定位管理器在Xcode 6中委派错误 [英] Self Location Manager Delegate error in Xcode 6

查看:219
本文介绍了自定位管理器在Xcode 6中委派错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用以下代码:
http://www.veasoftware.com/tutorials/2014/6/17/xcode-5-tutorial-ios-7-simple-compass-app
在Xcode 6中,我得到以下错误。该应用程序仍然运行,但这个错误真的很烦我。

I'm using code from: http://www.veasoftware.com/tutorials/2014/6/17/xcode-5-tutorial-ios-7-simple-compass-app In Xcode 6 I get the error below. The app still runs, but this error is really annoying me.

self.locationManager.delegate = self;
//Assigning to 'id<CLLocationManagerDelegate>' from incompatible type 'ViewController *const __strong'


推荐答案

我猜您在之后添加< CLLocationManagerDelegate> ,忘记遵守Core Location Delegate协议头文件中的@interface

I guess you forgot to comply with the Core Location Delegate protocol by adding <CLLocationManagerDelegate> after @interface in the header file.

这篇关于自定位管理器在Xcode 6中委派错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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