I have made a custom object called students that has two nsstring object. One is for the name and the other for the student id. If I try to pass the custom object to something that takes nsstring, it doesn’t work. I want to pass the name. How can I do this?
Share
You can nest your method calls like this:
Or if you defined your members as properties and want to access them via dot-notation:
The only issue with the dot-notation approach is the compiler will most likely give you warning that it couldn’t find the property
name, so you will need to cast it to the appropriate data type before accessing the property via dot-notation.