ios - 未知类型名称 UITableView

标签 ios objective-c uitableview

我正在尝试使用一个库进行下拉。当我在我的项目中复制它的文件时,我收到了奇怪的错误提示Unknown type name UITableView 以及很多错误,例如需要一个类型。这里有什么问题吗?

 @protocol kDropDownListViewDelegate;
 @interface DropDownListView : UIView<UITableViewDataSource,UITableViewDelegate>
{

    UITableView *_kTableView;
    NSString *_kTitleText;
    NSArray *_kDropDownOption;
   CGFloat R,G,B,A;
   BOOL isMultipleSelection;
}
 @property(nonatomic,strong)NSMutableArray *arryData;
 @property (nonatomic, assign) id<kDropDownListViewDelegate> delegate;
- (void)fadeOut;
// The options is a NSArray, contain some NSDictionaries, the NSDictionary contain 2 keys, one is "img", another is "text".
- (id)initWithTitle:(NSString *)aTitle options:(NSArray *)aOptions xy:(CGPoint)point size:(CGSize)size isMultiple:(BOOL)isMultiple;
// If animated is YES, PopListView will be appeared with FadeIn effect.
- (void)showInView:(UIView *)aView animated:(BOOL)animated;
-(void)SetBackGroundDropDwon_R:(CGFloat)r G:(CGFloat)g B:(CGFloat)b alpha:(CGFloat)alph;
@end

@protocol kDropDownListViewDelegate <NSObject>
 - (void)DropDownListView:(DropDownListView *)dropdownListView didSelectedIndex:(NSInteger)anIndex;
 - (void)DropDownListView:(DropDownListView *)dropdownListView Datalist:(NSMutableArray*)ArryData;
 - (void)DropDownListViewDidCancel;
 @end

最佳答案

你错过了一个#import;可能:

#import <UIKit/UIKit.h>

这通常是前缀文件(预编译 header )的一部分,因此可能以某种方式损坏。

关于ios - 未知类型名称 UITableView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27443761/

相关文章:

iOS 6.1.3 Mobile Safari/UIWebView 发送错误的区域设置区域代码

ios - RestKit 外键连接到多和一对一

ios - 应用程序特定的本地日历组不保存在 ios 9 但在 ios10 中工作

objective-c - 文字 NSString 是自动释放的还是需要释放的?

ios - UITableView - 在 vi​​ewDidAppear 之前滚动到底部

ios - 如何根据 UITableViewCells 的高度调整 UITableView 的高度?

iPhone:修改在 didSelectRowAtIndexPath 中选择的单元格

iphone - Cydia 和 AppStore 中的 iOS 应用

iphone - 如何在用户输入时为 UITextView 设置光标位置?

ios - 将对象数组映射到父对象数组中