簡體   English   中英

無法弄清誰是誰在打電話

[英]Can't figure out who is calling a class

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PeopleData initWithCoder:]: unrecognized selector sent to instance 0x6888c10'

我會盡量簡單。 這行怎么樣:

NSData* objData = [NSKeyedArchiver archivedDataWithRootObject:[newStorage yourStaticArray]];

知道在什么類中尋找NSCode? 現在我收到上面的錯誤,因為它正在錯誤的地方搜索NSCode。 PeopleData類中,只有屬性。

歸檔或取消歸檔對象時,會調用initWithCoderencodeWithCoder 請在PeopleData類中實現NSCoding

有關NSCoding教程。 這是一個很好的教程

暫無
暫無

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

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