Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Can't find the bundle resource after inheritance #186

Open
winterwd opened this issue Mar 13, 2017 · 0 comments
Open

Can't find the bundle resource after inheritance #186

winterwd opened this issue Mar 13, 2017 · 0 comments

Comments

@winterwd
Copy link

// original code
self.assetBundle = [NSBundle bundleForClass:[self class]];

If my VC inherited from QBImagePickerController, "[self class]" is actually get my own VC class, so it couldn't find the author's own bundle, if use "NSClassFromString (@ "QBImagePickerController")" this way for get a class, maybe solve this problem.

// fixed code
self.assetBundle = [NSBundle bundleForClass:NSClassFromString(@"QBImagePickerController")];

What are my own opinion, if not considering the, still hope pointed out!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant