Tag Archives: methods

mutating method swift simple example – how to write ?

mutating method swift simple example – how to write ? Structure and enumeration are value type in swift. That means an instance method can not change its properties. For example a method within structure cannot change any variable defined within structure. To do so you need a method that is mutating – means changing theā€¦ Read More »