Class Method not working in objective c

Posted by byteSlayer on Stack Overflow See other posts from Stack Overflow or by byteSlayer
Published on 2012-07-07T15:10:17Z Indexed on 2012/07/07 15:15 UTC
Read the original article Hit count: 140

In my code I have a class called 'ProfileShareViewController', In which I have imported another class I have created called 'OwnProfileData', And I have also created an Instance of that class (class = OwnProfileData) as a property Of 'ProfileShareViewController' and synthesized it (instance called 'OwnProfile').

In another class I have called 'EditProfileViewController', I have imported the 'ProfileShareViewController', and now I am trying to change a property of the OwnProfile object from the ProfileShareViewController within the EditProfileViewController class.

For some reason that doesn't work. I have Tried typing:

[[ProfileShareViewController ownProfile] setName:@"Ido"];

(The property I am trying to set is Name, and as it is synthesized in OwnProfileData, I am using 'setName'). This doesn't work and I get the warning: "No known class method for selector 'ownMethod'.

Any Idea as for why that might happen and how I can fix this?

Thanks for your comments! Any support is highly appreciated!

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about class