Edit #3: I somehow missed a second console message the 10 times I ran this, keeping me puzzled about this. It's a known problem that's been solved. I need "-all_load -ObjC" set as a linker flag, and I don't know why it wasn't already like that. See "Unknown class <MyClass> in Interface Builder file" error at runtime
I'm trying to use an FBLoginView
(part of the Facebook SDK framework), a subclass of UIView
, in my storyboard and set a property on it in viewDidLoad
in the view controller for its superview.
This is what I have:
The UIView (grey box) shown has its class set to FBLoginView
, as you can see. It's linked to the property loginView
in my view controller .m on the right.
In viewDidLoad
, it does _loginView.readPermissions = @[@"user_friends"]
, which causes the program to crash. Edit #2: The log says:
App became active.
Unknown class FBLoginView in Interface Builder file.
-[UIView setReadPermissions:]: unrecognized selector sent to instance 0x10c120b90
I set a breakpoint, and loginView
is a UIView
, not an FBLoginView
. This doesn't make sense; I already changed it to FBLoginView
in Interface Builder. How do I fix this?
Edit: Here is the connections inspector for the view controller in IB: