0

请有人帮助我!我整天都在这。我已经看到几个不同的stackoverflow问题得到了这个问题的回答,但我已经尝试了一切,但我就是想不通。这是我的整个项目,所以我不必在这里粘贴多个文件的代码。问题是当我尝试运行我的应用程序时,Xcode 在控制台中给了我这个错误。

2012-04-23 17:28:33.638 KMLViewer[96646:11603] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x6d8d5e0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key pageControl.'
*** First throw call stack:
(0x114c022 0x12ddcd6 0x114bee1 0xc5022 0x36f6b 0x36edb 0x51d50 0x59771a 0x114ddea 0x10b77f1 0x59626e 0x597eb7 0x374ce1 0x374ff8 0x37417f 0x383183 0x383c38 0x377634 0x1d46ef5 0x1120195 0x1084ff2 0x10838da 0x1082d84 0x1082c9b 0x373c65 0x375626 0x27bd 0x2735)
terminate called throwing an exception

谢谢你的帮助!这是下载它的链接:http ://www.mediafire.com/?4rd4xy8of1yv4ea

4

3 回答 3

1

The error shows that the pageControl setter is being called on a UIApplication object but it is defined on your UIScrolView_... class. This indicates a mixup between two class names; one place where this is common is in nib files. It turns out that your 'Main nib file base name' (located in the Info settings for the KMLViewer target) is wrong - it should be MainWindow. Once you fix that - the application runs a bit further but runs into a 'map' setter problem (which is probably fixed by @obuseme's response).

于 2012-04-24T01:17:56.630 回答
1

您在 OneTranquille.xib 中的类定义是错误的。它显示“KMLViewerViewController”,但应该是“OneTranquille”

于 2012-04-24T00:51:36.573 回答
0

另一个错误可能是名为 pagecontrol 的错误或不必要的 Outlet。查看连接检查器中的插座。

于 2013-05-28T14:25:44.553 回答