简体   繁体   中英

An initWithCoder method does not return a value

I am trying to resolve an application crash on startup. I made some mods to my app and now it crashes with the following message: This coder requires that replaced objects be returned from initWithCoder I made very small changes and I haven't done anything outside of the norm other than introduce a few IBOutlets in two view controllers. They both need to share an NSMutableDictionary for configuration purposes. I can't figure this out as everything was working fine before. :( I'm not calling initWithCoder directly anywhere and there's nothing in the stack that indicates anything I've done wrong. It's hinting towards the nib changes I made which don't make any sense! Does anyone know how to resolve this?

Seconds after posting I removed the NSMutableDictionary custom object from my nib and the crash goes away. I guess I cannot load/instantiate dictionary objects from a nib? This is odd and frustrating. I'm trying to forego the need for a dependency injection framework (objection) which is why I'm trying to use the nib file to load and wire everything together.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM