ios - 在 Xcode 中得到预期的类型

标签 ios objective-c xcode xcode5

<分区>

我收到错误:expected a type in xcode。我不知道为什么我的 .h 类中会出现这种错误。 这是我的代码和屏幕截图。

#import <Foundation/Foundation.h>
@interface NaviGationStack : NSObject
@property (nonatomic, strong) NSMutableArray *navigattionStack;
+(NaviGationStack*)navigationStackClass;
-(void)popViecontrollerFromStack;
-(int)getNumberElementInStack;
-(void)pushViewControllerToStack:(UIViewController *)viewController;

我在上一个函数中遇到了这个错误。 here is the error

最佳答案

导入 UIKit.h 而不是 Framework.h:

#import <UIKit/UIKit.h>

关于ios - 在 Xcode 中得到预期的类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21067429/

相关文章:

带有 NSString 问题的 iPhone 内存管理

xcode - swift fatal error : Array index out of range

objective-c - 解析 Objective C 中几个级别的 JSON

iOS:通过 splitViewController 模态(表单/页面)呈现 UIViewController

iphone - 出现错误后如何以用户友好的方式退出应用程序?

ios - 想在 UIAlertController 或 UIPopoverController Swift 中显示 UIPickerView?

objective-c - 在方法中保留变量

ios - Flutter iOS应用程序无法运行,但未找到错误app_settings

ios - 在 TextField 中格式化部分文本

ios - 来自字符串的子字符串特定整数