简体   繁体   English

在“ myproj” -Bridging-Header.swift中预期出现类型错误

[英]Expected a type error in 'myproj'-Bridging-Header.swift

enter image description here When I add UIIMage+Gif.swift file to my Objective C project to add GIF images in Swift files inside my Obj-C project I got "expected a type" error in generated swift header file. 在这里输入的形象描述当我添加的UIImage + Gif.swift文件到我的目标C项目,以在斯威夫特文件添加我的OBJ-C项目中的GIF图像我得到了“预期类型”中产生迅速的头文件的错误。

+ (double)delayForImageAtIndex:(NSInteger)index source:(CGImageSourceRef _Null_unspecified)source;
+ (UIImage * _Nullable)animatedImageWithSource:(CGImageSourceRef _Nonnull)source;

Simple, 简单,

add new file by right clicking on left panel where all objective c file and add new file and name it uiimage+gif its working 通过右键单击所有目标c文件所在的左侧面板来添加新文件,并添加新文件并将其命名为uiimage + gif

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 未找到swift 3 xcode 8'MBProgressHUD.h'文件无法导入桥接头'/myPath/myProj/myProj/myProj-Bridging-Header.h' - swift 3 xcode 8 'MBProgressHUD.h' file not found failed to import bridging header '/myPath/myProj/myProj/myProj-Bridging-Header.h' 我使用桥接头将Objective-C文件导入Swift项目,但是出现错误“Expected a type” - I have imported Objective-C files into a Swift project using bridging header, but there is an error “Expected a type” Swift-桥接头文件编译器错误 - Swift - bridging header compiler error Swift Bridging Header - 使用未声明类型的“FMDatabase”错误 - Swift Bridging Header - Use of undeclared type 'FMDatabase' error 需要类型 & 无法导入桥接头 - Expected a type & Failed to import bridging header 错误:通过桥接头在Swift项目中使用旧的Objective C库后,预期的标识符或'(' - Error : Expected identifier or '(' after usage of old Objective C library in Swift project through bridging header Swift编译器错误-无法导入桥接头 - Swift Compiler Error - failed to import bridging header Swift 中的桥接标头转换 - Bridging header conversion in Swift 桥接标头错误-“ xxx-Bridging-Header.h”文件未在SWIFT中退出 - Bridging header error — “xxx-Bridging-Header.h”file does not exit in SWIFT 未声明的类型 - 通过桥接标头在 Swift 中使用 C 结构 - Undeclared type - using C struct in Swift by bridging header
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM