0

I searched about strong and weak alot. But still I can't understand the purpose of these two attributes What happen to these strong and weak properties if we are moving from one view controller to another and coming from second view controller to first view controller ? In the this case let us consider there are one strong and one weak property in each view controller, and then explain me what exactly happen to these properties are they both destroy or when strong will destroy and when weak will destroy in ARC.

Thanks in Advance !!!

1 Answers1

0

Properties are used to declare a class’s accessor methods. How can a class access its data and method.While declaring property You can then optionally provide a parenthesized set of property attributes that define the storage semantics and other behaviors of the property.When we are defining an object's property as weak/strong we are defining its accessibility to the class. For more reference you can have a look at these guides.

  1. Objective-C declared @property attributes (nonatomic, copy, strong, weak)
  2. https://www.quora.com/What-is-the-difference-between-strong-retain-nonatomic-etc-in-the-Objective-C-iOS-property

Hope it helps.. Happy Coding..:)

Community
  • 1
  • 1
luckyShubhra
  • 2,731
  • 1
  • 12
  • 19