当我使用示例应用程序时,我正在使用来自第三方的SDK,我没有错误,当我将SDK添加到我的应用程序时,我收到此错误:
此行Expected a type
上的 +(UIImage *)arrowImage;
我在方法定义上遇到了一堆错误,如:
+(UIColor *)itemsColor;
+ (UIColor *)mainColor;
+ (UIColor *)itemTextColor;
+ (UIColor *)selectionColor;
为什么我只为这些方法收到这些错误?请帮助!
这是完整的.h文件:
#import <Foundation/Foundation.h>
@interface SIMenuConfiguration : NSObject
//Menu width
+ (float)menuWidth;
//Menu item height
+ (float)itemCellHeight;
//Animation duration of menu appearence
+ (float)animationDuration;
//Menu substrate alpha value
+ (float)backgroundAlpha;
//Menu alpha value
+ (float)menuAlpha;
//Value of bounce
+ (float)bounceOffset;
//Arrow image near title
+(UIImage *)arrowImage;
//Distance between Title and arrow image
+ (float)arrowPadding;
//Items color in menu
+(UIColor *)itemsColor;
//Menu color
+ (UIColor *)mainColor;
//Item selection animation speed
+ (float)selectionSpeed;
//Menu item text color
+ (UIColor *)itemTextColor;
//Selection color
+ (UIColor *)selectionColor;
@end
答案 0 :(得分:1)
将#import <Foundation/Foundation.h>
替换为@import UIKit
。如评论中所述,UIColor
是UIKit的一部分。