Skip to content

Instantly share code, notes, and snippets.

View shaktiprakash099's full-sized avatar

Shakti Prakash Srichandan shaktiprakash099

  • Globussoft
  • Bangalore,India
View GitHub Profile
let json = """
[{
"first_name": "Shakti",
"last_name": "prakash",
"age":25,
"address":"Cuttack,Odisha,India"
},
{
"first_name": "Soumen",
"last_name": "Mohanty",
import Foundation
import UIKit
let json = """
[{
"first_name": "Shakti",
"last_name": "prakash",
"age":25,
"address":"Cuttack,Odisha,India"
},
extension ItemsListsViewController:UITableViewDelegate,UITableViewDataSource{
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 80.0
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return itemLists.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
import UIKit
class TableViewCustomDataSource<Model>: NSObject,UITableViewDataSource{
typealias CellConfigurator = (Model,UITableViewCell)-> Void
var models:[Model]
private let reuseIdentifier:String
private let cellConfigurator: CellConfigurator
init(models:[Model],reuseIdentifier:String,cellConfigurator:@escaping CellConfigurator) {