Iphone 使用OHGridView无法识别的选择器

Iphone 使用OHGridView无法识别的选择器,iphone,objective-c,cocoa-touch,gridview,Iphone,Objective C,Cocoa Touch,Gridview,我下载了OHGridView,希望它能解决我所有的问题 我做了它说要做的所有事情(添加类文件、添加代码,以及更改其他一些事情) 我去建造它,结果它坠毁了。我意识到了它崩溃的原因: ((OHGridView *)self.view).rowHeight = 100; ((OHGridView *)self.view).columnsCount = 2; 来自控制台的错误: `-[UIView setRowHeight:]: unrecognized selector sent to insta

我下载了OHGridView,希望它能解决我所有的问题

我做了它说要做的所有事情(添加类文件、添加代码,以及更改其他一些事情)

我去建造它,结果它坠毁了。我意识到了它崩溃的原因:

((OHGridView *)self.view).rowHeight = 100;
((OHGridView *)self.view).columnsCount = 2;
来自控制台的错误:

`-[UIView setRowHeight:]: unrecognized selector sent to instance 0x4b55110
2011-02-20 09:01:16.906 TableView[14358:207] *** Terminating app due to uncaught     exception 'NSInvalidArgumentException', reason: '-[UIView setRowHeight:]: unrecognized  selector sent to instance 0x4b55110'
*** Call stack at first throw:
(
0   CoreFoundation                      0x00e4dbe9 __exceptionPreprocess + 185
1   libobjc.A.dylib                     0x00fa25c2 objc_exception_throw + 47
2   CoreFoundation                      0x00e4f6fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3   CoreFoundation                      0x00dbf366 ___forwarding___ + 966
4   CoreFoundation                      0x00dbef22 _CF_forwarding_prep_0 + 50
5   TableView                           0x00004232 -[DetailViewController viewDidLoad] + 831
6   UIKit                               0x0037165e -[UIViewController view] + 179
7   UIKit                               0x0036fa57 -[UIViewController contentScrollView] + 42
8   UIKit                               0x00380201 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
9   UIKit                               0x0037e831 -[UINavigationController _layoutViewController:] + 43
10  UIKit                               0x0037fa86 -[UINavigationController _startTransition:fromViewController:toViewController:] + 326
11  UIKit                               0x0037a606 -[UINavigationController _startDeferredTransitionIfNeeded] + 266
12  UIKit                               0x0038183e -[UINavigationController pushViewController:transition:forceImmediate:] + 932
13  UIKit                               0x0037a4a0 -[UINavigationController pushViewController:animated:] + 62
14  TableView                           0x00002e4f -[RootViewController tableView:didSelectRowAtIndexPath:] + 681
15  UIKit                               0x00339794 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1140
16  UIKit                               0x0032fd50 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 219
17  Foundation                          0x000427f6 __NSFireDelayedPerform + 441
18  CoreFoundation                      0x00e2efe3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 19
19  CoreFoundation                      0x00e30594 __CFRunLoopDoTimer + 1220
20  CoreFoundation                      0x00d8ccc9 __CFRunLoopRun + 1817
21  CoreFoundation                      0x00d8c240 CFRunLoopRunSpecific + 208
22  CoreFoundation                      0x00d8c161 CFRunLoopRunInMode + 97
23  GraphicsServices                    0x016ef268 GSEventRunModal + 217
24  GraphicsServices                    0x016ef32d GSEventRun + 115
25  UIKit                               0x002d242e UIApplicationMain + 1160
26  TableView                           0x00001abc main + 102
27  TableView                           0x00001a4d start + 53
)
terminate called after throwing an instance of 'NSException`
我删除了它们,它加载得很好,但我没有看到任何内容

请帮忙,
谢谢。

我刚才克隆了存储库,然后构建并运行了他的示例项目,没有对代码做任何更改。它运行时没有任何警告或错误

无论在何处进行更改,都需要检查代码。
评论后更新
无法识别的选择器
通常表示您有大写错误,或者您的代码不是您认为的对象类型。
例如:如果我尝试直接对
OHGridView
对象调用
setRowHeight:
而不是对象的
view
属性,我会得到与您几乎相同的错误,如下所示

    ((OHGridView*)self).rowHeight = 100;
((OHGridView*)self).columnsCount = 2;

因此,我会检查您的代码,以确保您的对象是OHGridView,并且您正在设置OHGridView视图的rowHeight属性。

我也做了同样的事情,但在尝试将其放入另一个项目时,它崩溃了。我已经编辑了这篇文章,并把我的错误放在了控制台上。谢谢!我检查了,但没有将视图指定给OHGridView。。。我真傻!