ios - Can't encode an array of Strings in Swift -


i can't seem arrays accepted encode function. error getting

"cannot invoke 'encode' argument list of type '([string], forkey: [string])'

var billid: [string]=[] var billnumber: [string]=[] var billtitle: [string]=[] var billdescription: [string]=[] var lastaction: [string]=[] var lastactiondate: [string]=[]  struct statelawdata {     static let state: string="state"     static let lastupdate: string="lastupdate"     static var billids: [string]=[]     static let billnumbers: [string]=[]     static let billdescriptions: [string]=[]     static let billtitles: [string]=[]     static let lastactions: [string]=[]     static let lastactiondate: [string]=[] }  override func encode(with acoder: nscoder) {     acoder.encode(stateabbr, forkey: statelawdata.state)     acoder.encode(lastupdatetime, forkey: statelawdata.lastupdate)     acoder.encode(billid, forkey: statelawdata.billids)     acoder.encode(billnumber, forkey: statelawdata.billnumbers)     acoder.encode(billtitle, forkey: statelawdata.billtitles)     acoder.encode(billdescription, forkey: statelawdata.billdescriptions)     acoder.encode(lastaction, forkey: statelawdata.lastactions)     acoder.encode(lastactiondate, forkey: statelawdata.lastactiondate) } 

this within uitableviewcontroller

all keys need strings. in other words, of static statelawdata variables need string, first two.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -