我在很多項目中都有UIScrollViewSlidingPages
和SSPullToRefresh
庫,但突然間,我在這個新的iOS 8項目中出現了這些奇怪的錯誤。iOS 8預計類型
#import <Foundation/Foundation.h>
@interface TTSlidingPageTitle : NSObject
-(id)initWithHeaderText:(NSString*)headerText;
-(id)initWithHeaderImage:(UIImage*)headerImage;
//The title text to go in the nav bar
@property(strong, nonatomic) NSString *headerText;
//An image to use in the nav bar (if you set this, the title text will not be used)
@property(strong, nonatomic) UIImage *headerImage;
@end
此行得到「預期A型」錯誤:
-(id)initWithHeaderImage:(UIImage*)headerImage;
而此行是越來越「未知類型名稱的UIImage」錯誤:
@property(strong, nonatomic) UIImage *headerImage;
你應該確保標記一種語言。它會影響語法突出顯示並幫助他人找到問題。 – crashmstr 2014-10-16 19:49:06
我的第一個猜測是,你意外地編譯OSx而不是iOS。 – 2014-10-16 19:57:38
我該怎麼做? – 2014-10-16 19:58:57