KINWebBrowser icon indicating copy to clipboard operation
KINWebBrowser copied to clipboard

Subclassing issues

Open mamouneyya opened this issue 8 years ago • 2 comments

When subclassing the web browser view controller in Swift, the library seems to not access the resources anymore, making back / forward bar button images disappear.

mamouneyya avatar Jun 12 '16 16:06 mamouneyya

After a quick digging in the code, I can see that in line 408 in KINWebBrowserViewController.m you get the class of the bundle using self, which won't work when subclassing. Explicitly specifying the class name solves the issue: NSBundle *bundle = [NSBundle bundleForClass:[KINWebBrowserViewController class]]; instead of: NSBundle *bundle = [NSBundle bundleForClass:[self class]];

I can make a PR for you if you're okay.

mamouneyya avatar Jun 12 '16 16:06 mamouneyya

Duplicate of #57

wei avatar Jun 15 '16 21:06 wei