in my viewcontroller class i have a property UIViewPicker
myPicker. in didSelectRow method (also implemented by the UIPicker delegate. I try the following
NSString* temp = [self.myPicker titleForRow:1 inComponent:0].
However it says that the method is not found and says that return type defaults to "id".
What am i doing wrong????`
"it says that the method is not found" because this a delegate method for UIPickerViewDelegate. Check the Apple Documentation. Delegate methods are implemented, NOT called! Delegates are like listeners and their methods need to be implemented by the class that implements the delegates. The methods are called automatically and the order in which they are called is predefined. You only have to know the conditions under which they are called.
You can always create your own methods as long as they are different from the delegate methods.