小编Nic*_*ang的帖子

ProjectName-Swift问题 - 找不到'CLLocationManagerDelegate'的协议声明

我现在在我现有的Object-C项目中使用Swift类.在我的Swift类中,我正在使用CLLocationManagerDelegate.一切都很好.但是,当生成ProjectName-Swift.h时,ProjectName-Swift.h文件中的问题显示无法找到"CLLocationManagerDelegate"的协议声明.我试图通过在ProjectName-Swift.h中导入CoreLocation/CoreLocation.h来解决这个问题.有效.但是经过几次编译后,CoreLocation/CoreLocation.h就消失了,因为ProjectName-Swift.h是从我的swift类生成的.这个问题又来了.

项目名 - Swift.h

发布截图 这是我的快速课程(这里没有问题)

import UIKit import CoreLocation @objc class SSDLocationHelper: NSObject, CLLocationManagerDelegate { let locationManager = CLLocationManager() func findUserLocation() { ... }
Run Code Online (Sandbox Code Playgroud)

xcode ios swift

12
推荐指数
1
解决办法
3248
查看次数

标签 统计

ios ×1

swift ×1

xcode ×1