I\'ve gone through a bunch of answers regarding this problem but none seem to relate to my problem.
I have two views, View 1 has a button. View 2 has a button.
I faced this when I extracted a .app from a zip file and attempted to run it, both on an iOS device and on Simulator.
One .nib file had been named with non-latin characters (fileNormal.nib
with the greek letters No
) and when extracted from the zip, it was assigned letters from another charset (it should be Greek-DOS or something compatible). I chose a different charset upon extraction and it worked as it should.
Just putting this in case someone else faces the same problem ;)
I tried all above answer but they didn't work. For me, the solution was to include the xib to the target resource.
Steps performed:
You may have to setup the bundle for the class before accessing the xib:
ObjectiveC:
//Bundle initialisation
NSBundle* bundle = [NSBundle bundleForClass:[self class]];
//Initialising the nib
UIView *nibView = [[bundle loadNibNamed:@"nibFileName" owner:self options:nil] objectAtIndex:0];
//Display the ad (this will vary based on your application setup)
[[[UIApplication sharedApplication] keyWindow] addSubview:nibView];
In my case exact same exception was caused by the fact that two controllers had same storyboard id (within one storyboard)
It's also possible the UITableViewDataSource or UITableViewDelegate are not implemented in the desired UIViewController
If you're working with cocoapods, it may also help to run pod update
. One of my teammates changed a pod around which resulted in that error, so pod update fixed it for me.