这真让我抓狂!我什至有一个不同的项目,它使用完全相同的 h 文件可以正常工作,但事实并非如此。Xcode一直迫使我必须通过将@end(粗体)放入红色来放置它,然后它以红色错误“@end必须出现在目标c上下文中”拒绝自己的建议。我究竟做错了什么!!!!!!
#import <Foundation/Foundation.h>
@class AFHTTPRequestOperation;
@protocol AFHTTPClientOperation;
@protocol AFMultipartFormData;
#ifdef _SYSTEMCONFIGURATION_H
extern NSString * const AFNetworkingReachabilityDidChangeNotification;
#endif
#ifdef _SYSTEMCONFIGURATION_H
typedef enum {
AFNetworkReachabilityStatusUnknown = -1,
AFNetworkReachabilityStatusNotReachable = 0,
AFNetworkReachabilityStatusReachableViaWWAN = 1,
AFNetworkReachabilityStatusReachableViaWiFi = 2,
} AFNetworkReachabilityStatus;
#endif
typedef enum {
AFFormURLParameterEncoding,
AFJSONParameterEncoding,
AFPropertyListParameterEncoding,
} AFHTTPClientParameterEncoding;
extern NSString * AFURLEncodedStringFromStringWithEncoding(NSString *string, NSStringEncoding encoding);
extern NSString * AFQueryStringFromParametersWithEncoding(NSDictionary *parameters, NSStringEncoding encoding);
**@end** //Here it keeps trying to force me to place an @end, then gives the error "@end must appear in objective c context"
@interface AFHTTPClient : NSObject <NSCoding, NSCopying>
...
@end