Xcode Outlet generation does not generate @synthezise
-
12-12-2019 - |
Question
I am having an issue with Drag and Drop Outlet generation, for some reason Xcode stopped generating @synthezise to the .m file, the @property is added correctly to the .h file.
Also I find it odd that an @interface block is added to the .m file even so the .h file with the @interface exists.
@interface BlahController {
}
@implementation BlahController : UIViewController {
//Code
}
Solution 2
In Advanced thank you to Carl Veazey, who pretty much wrote up this answer in the comments:
- The interface is for private variables.
- The "missing" @property have to be accessed by _variableName.
Many Thanks again.
OTHER TIPS
I am having an issue with Drag and Drop Outlet generation, for some reason XCode stopped generating @synthezise to the .m file, the @property is added correctly to the .h file.
The newest version of the compiler doesn't require @synthesize
directives anymore. Just declaring a property using the @property
directive is enough to cause the accessor(s) to be synthesized unless you use either the @dynamic
directive or provide your own accessor(s) for the property.