簡體   English   中英

***由於未捕獲的異常'NSInvalidArgumentException'而終止應用程序,原因:'-[MKUserLocation注解類型]:無法識別的選擇器

[英]*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MKUserLocation annotationType]: unrecognized selector

嘗試添加用戶位置時,我收到此錯誤。 我有一個表格視圖,當我嘗試滾動時,出現此錯誤。 我是xcode的新手。

*由於未捕獲的異常'NSInvalidArgumentException'而終止應用程序,原因:'-[[MKUserLocation注解類型]:無法識別的選擇器已發送到實例0x803f090'

任何幫助深表感謝。

MKUserLocation沒有注釋類型方法。 您正在向MKUserLocation發送一條消息,它不知道如何處理。

我以前遇到過這種情況,通常是因為簡單且不明顯的錯誤類型,即格式錯誤-沒有調用基於意外格式的函數而鍵入錯誤。

我用了:

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(ABC:) ....name:@"UIDeviceBatteryLevelDidChangeNotification" object:nil];

我聲明的“ ABC”功能不是基於預期的功能格式。

代替:

- (void) ABC:(NSNotification *)notification 

我用了:

- (NSString *)DDD 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM