Re: Strange XCode Warning
Re: Strange XCode Warning
- Subject: Re: Strange XCode Warning
- From: Dave <email@hidden>
- Date: Tue, 15 Sep 2015 17:10:45 +0100
Class<LTWDetailViewProtocol>
That declaration doesn’t make sense, because the class Class (i.e. a metaclass) can’t conform to a protocol. I think that’s the source of the strange warning; the compiler is sort of confused about whether that type denotes a class or an instance.
Change the type to just plain Class and it should compile.
If I remove it from the method definition, then I won’t get a warning if I pass a class to it that doesn’t conform.
The thing is adding the “conformsToProtocol" statement was just belt-and-braces because the code will crash and burn if the Class and resultant Instance do not conform and the warning generated on the call was ignored.
I’m not sure which is best/worst?!?
Cheers Dave
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden