When i am using
self.profilePic.profileID = user.id;
i end up with this error
-[UIView setProfileID:]: unrecognized selector sent to instance 0x69626f0
2012-09-11 09:49:50.535 TweetApp[992:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setProfileID:]: unrecognized selector sent to instance 0x69626f0'
can anyone help on this topic??
I believe you are talking about Facebook Scrumptious sample project. If that is the case, you have to set the Class of UIView control to FBProfilePictureView
You can fix this issue simply. Just put this line code [FBProfilePictureView class];
at the first line of method application:didFinishLaunchingWithOptions:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[FBProfilePictureView class];
//...
return YES;
}
I had the same problem, itsaboutcode is right. Call [FBProfilePictureView class]; in your AppDelegate and the problem will be fix
++
Let's do it step-by-step.
self.profilePic
refers to your property of UIView
type.
Then you are trying to set this property's property profileID
, but UIView
class doesn't have such and you get the exception.
It will be easy for you to understand in the future from the error message, pay attention to the reason:
'-[UIView setProfileID:]: unrecognized selector sent to
instance 0x69626f0'
It tells you the method -setProfileID:
is called for UIView*
object and with the code you posted it is clear why it happens.
I suppose you have profileID
property in the view controller, then you'll want to use
self.profileID = user.id;
Or if self.profilePic
should support profileID
property then you initialized it incorrectly, find the initialization place to see what happens.
I faced the same problem make sure your profile pic is an instance of FBProfilePictureView go to your layout and change the class of your view to be FBProfilePictureView notice your fb profile pic is a UIView not an ImageView that means u need to add view and change its class to FBProfilePictureView not an ImageView
also add this line at the first of your app delegate [FBProfilePictureView class];