Search code examples
iphoneobjective-cuiimageviewuibuttonuitouch

Do we have to synthesize UIImageView and UIBUtton in any simple UITouch program?


Do we have to synthesize UIImageView and UIButton in any simple UITouch program? I googled but could not find any relevant any clear answer.


Solution

  • We synthesize the properties. if we declare any variable, object and IBOutlet as property then we definitely need to synthesize it.

    Make this as your practice, this is a good practice follow these step

    • declare your UIControl
    • Make IBOutlet
    • Make property
    • Make connections
    • Synthesize it in .m
    • set nil in viewDidUnload
    • release it dealloc.