xcode - Signal SIGABRT in Swift using NSuserdefaults -
i'm building swift game , need set class. code works elements in class, not this.
func saveinformationmember(){ var membersdefaultname = nsuserdefaults.standarduserdefaults() membersdefaultname.setvalue(globalcurrentmembers, forkey: "globalcurrentmembersdata") membersdefaultname.synchronize()
}
globalcurrentmembers
array of member
wich looks that:
class member { var image = string () var name = string () var progression = int() var round = int() var level = int() var imageprogression = [uibutton]() func init(){ image = "default.png" name = "default" progression = 0 round = 0 level = 0 }
thx in advance help.
to save class way, member
needs conform nscoding
protocol.
Comments
Post a Comment