我需要为我的要求制作swift静态库.我制作了swift静态库,它使用swift和Obj-c代码.我通过桥文件包含了Obj-c文件.我能够编译swift静态库而不会出现任何错误,并获取libMySwift.a文件.我使用Xcode9.3和Swift4来编译库.
我在obj-c项目中包含了libMySwift.a,还包含了obj-c兼容的头文件来访问项目中的lib.当我尝试编译项目时,它会给出以下警告和200多个错误.
Auto-Linking library not found for -lswiftSwiftOnoneSupport
Auto-Linking library not found for -lswiftCore
Auto-Linking library not found for -lswiftQuartzCore
Auto-Linking library not found for -lswiftCoreImage
Auto-Linking library not found for -lswiftCoreGraphics
Auto-Linking library not found for -lswiftObjectiveC
Auto-Linking library not found for -lswiftDispatch
Auto-Linking library not found for -lswiftMetal
Auto-Linking library not found for -lswiftFoundation
Auto-Linking library not found for -lswiftUIKit
Auto-Linking library not found for -lswiftDarwin
Auto-Linking library not found for -lswiftCoreFoundation
Run Code Online (Sandbox Code Playgroud)
如果我遗漏任何步骤或需要添加任何内容,请告诉我.
我在iPhone应用程序中有四个页面.所有4个页面都是UIViewController的子类.两个页面有UITableView来显示项目列表.两个页面有UICollectionView来显示数据.在AFNetworking的帮助下从Web服务获取的所有数据.它没有任何问题.我使用所有必需和推荐的方法从tableView和collectionView的storyboard中显示自定义单元格.
在我将Xcode 8.3更新为Xcode 9.0和iOS 11之前,它曾用于在模拟器和设备中显示平滑滚动.我尝试使用此解决方案以及来自SO的其他可能解决方案,但无法解决我的问题.最令人困惑的部分是我没有改变tableView或collectionView的单行代码,它开始显示波动效应.
看起来它每秒都在等待一些事情,并且即使在显示数据时我没有任何复杂的逻辑也会显着地滚动.我只是在Web服务响应中显示数据.我有旧的分支,它曾经用Xcode 8.3显示平滑滚动但是当我用Xcode 9.0运行相同的代码时,它显示不连贯的滚动.
我使用macOS 10.12.6,Xcode 9,Swift 4以及iOS 11和iOS 10.3的模拟器.