Sometimes I have a interface that implements several protocols and I'll get a warning from XCode that my implementation is incomplete.
Is there an easy way to determine which methods are "required" but but implemented (without having to put in dummy implementations of all the non-optional methods from the protocol header files)?
For example, I have a warning on this interface but I don't want to have to dig through all the protocols.. obviously XCode knows that some are missing, why can't it just tell which they are!
@interface KTThumbsViewController : UIViewController <KTThumbsViewDataSource, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UIAlertViewDelegate>
XCode 4
Didn't find the answer here, unfortunately. But a bit more digging turned up an answer, in the Issue navigator in the Navigator View.
Open the Navigator view via the View buttons at upper-right:
Then open the Issue navigator via the triangle/exclamation mark button at upper-left:
If you expand your "Incomplete implementation" Semantic Issue with the little triangle at left, you can see the details of XCode's complaint.
Press alt and click on the protocol, xcode will show you where it is defined so you can take a look at the header file. Alternatively in the "issues" tab it will show you which methods you did not implement yet.
As a followup to this
Sometimes "Incomplete Implementation" really means "Mismatch between the function prototype and the implemented function".
For example, if in your .h file you had this:
- (NSTimeInterval) SayDigit: (int) score;
But in your .m file you had this:
- (NSTimeInterval) SayDigit: (int) digit: (NSTimeInterval) time
You would get the "Incomplete Implementation" warning.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With