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??
Let's do it step-by-step.
self.profilePic
refers to your property ofUIView
type.Then you are trying to set this property's property
profileID
, butUIView
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:
It tells you the method
-setProfileID:
is called forUIView*
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 useOr if
self.profilePic
should supportprofileID
property then you initialized it incorrectly, find the initialization place to see what happens.You can fix this issue simply. Just put this line code
[FBProfilePictureView class];
at the first line of method application:didFinishLaunchingWithOptions:I had the same problem, itsaboutcode is right. Call [FBProfilePictureView class]; in your AppDelegate and the problem will be fix
++
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];
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