- Made address cell - Added address Get api. - Completed create order api. - updated to get the link url. - Updated end points.
68 lines
2.0 KiB
Swift
68 lines
2.0 KiB
Swift
//
|
|
// AddressListVC.swift
|
|
// WOKA
|
|
//
|
|
// Created by MacBook Pro on 25/07/24.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
class AddressListVC: UIViewController {
|
|
|
|
@IBOutlet weak var innerView: UIView!
|
|
@IBOutlet weak var tableView: UITableView!
|
|
@IBOutlet weak var useSelectedAddBtn : LocalisedElementsButton!
|
|
@IBOutlet weak var addNewAddressBtn : LocalisedElementsButton!
|
|
|
|
var vm = AddressListVM()
|
|
|
|
override func viewDidLoad() {
|
|
super.viewDidLoad()
|
|
vm.vc = self
|
|
vm.initView()
|
|
|
|
navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
|
|
navigationController?.navigationBar.shadowImage = UIImage()
|
|
}
|
|
|
|
override func viewWillAppear(_ animated: Bool) {
|
|
super.viewWillAppear(animated)
|
|
navigationController?.setNavigationBarHidden(false, animated: animated)
|
|
}
|
|
|
|
override func viewDidAppear(_ animated: Bool) {
|
|
self.navigationController?.setColor(color: .white)
|
|
|
|
}
|
|
|
|
override func viewWillDisappear(_ animated: Bool) {
|
|
super.viewWillDisappear(animated)
|
|
self.navigationController?.setNavigationBarHidden(true, animated: animated)
|
|
}
|
|
|
|
override func viewDidDisappear(_ animated: Bool) {
|
|
super.viewDidDisappear(animated)
|
|
|
|
// Customize the navigation bar's appearance
|
|
self.navigationController?.setColor(color: .black)
|
|
}
|
|
|
|
@IBAction func btnTapped(_ sender: LocalisedElementsButton) {
|
|
}
|
|
}
|
|
|
|
// MARK: - TableView DataSource , Delegates
|
|
|
|
extension AddressListVC : TableViewSRC{
|
|
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
|
return vm.addressData.count
|
|
}
|
|
|
|
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
|
let cell = tableView.dequeueReusableCell(withIdentifier: K.CellIdentifier.Cart.addressCell) as! AddressCell
|
|
let data = vm.addressData[indexPath.row]
|
|
cell.setData(data: data)
|
|
return cell
|
|
}
|
|
}
|