Files
Woka_Native_iOS/WOKA/SideBarNav/Controller/MyOrdersVC.swift
BilalKhanWDI 22796ec0b1 - Made new module for Cart
- Finalised Listing of CartList
- Added pull to refresh and swipe to delete
- Handled manual delete on icon click
- Made CouponCart listing view controller
- Added api to fetch the coupons
- Added api to apply coupon with model
- Made a coupon discount stack , will show up
2024-07-23 19:53:12 +05:30

50 lines
1.4 KiB
Swift

//
// MyOrdersVC.swift
// WOKA
//
// Created by MacBook Pro on 10/06/24.
//
import UIKit
class MyOrdersVC: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.title = "MY ORDERS"
let btn = BadgedButtonItem(with: UIImage(named: "CartIcon"))
btn.badgeTintColor = .red
btn.badgeTextColor = .green
btn.position = .right
btn.hasBorder = true
btn.borderColor = .red
btn.badgeSize = .large
btn.badgeAnimation = true
btn.setBadge(with: 1)
btn.tapAction = {
let sb = UIStoryboard(name: K.StoryBoard.cart, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Cart.cartListVC) as! CartListVC
self.navigationController?.pushViewController(vcPush, animated: true)
}
self.navigationItem.rightBarButtonItem = btn
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.navigationController?.setColor(color: .black)
navigationController?.setNavigationBarHidden(false, animated: animated)
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
navigationController?.setNavigationBarHidden(true, animated: animated)
}
override func viewDidDisappear(_ animated: Bool) {
self.navigationController?.setColor(color: .black)
}
}