views:

313

answers:

1

I cant understand what this warning I get on Xcode is about. Searching for it on google wasn't of too much help. If anyone has come across this warning before, it'd be great if I could get some hints on how I'd be able to get rid of it.

The (updated) screenshot is at:

http://imagebin.antiyes.com/images/0116033001255720169%5F90.png

Thanks again.

EDIT: warning messages, for future searching
warning: property 'title' 'copy' attribute does not match super class 'UIViewController' property
warning: property 'title' type does not match super class 'UIViewController' property type

+12  A: 

By naming the property "title" in PageViewController, you are actually overriding the title property defined in UIViewController. So either choose a different name for your subclass' property, or use the one defined by UIViewController. I would suggest the second one, since it looks like you are simply trying to store a the title of your view.

When you override a property in a subclass, there are certain attributes that cannot be different from the superclass' definition. Two of those things are type and copy vs. retain vs. assign (the "copy attribute", as the warning states). Since you've defined your version of title differently in this areas than UIViewController, you get the warnings.

Marc W
That worked. Thanks at lot.
Acharya

related questions