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

Popular posts from this blog

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -

How to run C# code using mono without Xamarin in Android? -