Created array of dictionary having buttons.
-created UITableviewcell.xib and .swift -created ib -linked ib -linked dataSource and Delegates need help further to read my plist data and show it into tableViewCell
Created array of dictionary having buttons.
-created UITableviewcell.xib and .swift -created ib -linked ib -linked dataSource and Delegates need help further to read my plist data and show it into tableViewCell
Use Decodable, it's very simple
struct Section : Decodable {
let title, icon : String
}
If the file is in the bundle, read it as Data and decode it
let url = Bundle.main.url(forResource: "sections", withExtension: "plist")!
do {
let data = try Data(contentsOf: url)
let result = try PropertyListDecoder().decode([Section].self, from: data)
} catch { print(error) }
result will contain an array of Section items