Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leoiphonedev/40a894ff530b409d44e64c7ae7a7fbc5 to your computer and use it in GitHub Desktop.
Save leoiphonedev/40a894ff530b409d44e64c7ae7a7fbc5 to your computer and use it in GitHub Desktop.
Populating our employee Array with dummy data in order to create csv file
class ViewController: UIViewController {
var employeeArray:[Dictionary<String, AnyObject>] = Array()
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
for i in 1...10 {
var dct = Dictionary<String, AnyObject>()
dct.updateValue(i as AnyObject, forKey: "EmpID")
dct.updateValue("NameForEmplyee id = \(i)" as AnyObject, forKey: "EmpName")
employeeArray.append(dct)
}
}
}
@leoiphonedev
Copy link
Author

@revolter The gist was published on 10 jan 2018 and answer given on stack overflow was asked on 26 April 2019. So who’s stealing here. πŸ‘πŸ‘πŸ‘πŸ‘πŸ»

@revolter
Copy link

revolter commented Oct 7, 2022

Ah, wow, apologies πŸ™‡πŸ»β€β™‚οΈ It's just that I got sick and tired of random websites just scraping StackOverflow for views, and I mistakenly didn't verify the dates 😞 I edited that answer, to make things straight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment