Files
Woka_Native_iOS/WOKA/SideBarNav/Controller/FaqVC.swift
BilalKhanWDI a5b33a3cfa - Fixed the issue of Presenting the view controller. So added it in navigation bar
- Handled the dismiss of jwplayer view controller
- Made sidebar navigation
- Worked on NAvigation for Live TV
- Prepared FAQ API
- Made FAQ View
- Customized the FAQ Cell
2024-06-03 20:02:39 +05:30

58 lines
1.8 KiB
Swift

//
// FaqVC.swift
// WOKA
//
// Created by MacBook Pro on 03/06/24.
//
import UIKit
class FaqVC: UIViewController {
@IBOutlet weak var tableView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
let color1 = #colorLiteral(red: 0.05490196078, green: 0.01176470588, blue: 0.3882352941, alpha: 1)
let color2 = #colorLiteral(red: 0.2705882353, green: 0.2078431373, blue: 0.7647058824, alpha: 1)
self.view.applyGradient(colors: [color1, color2], startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0, y: 0.8))
self.title = "FAQs"
setupCell()
}
func setupCell(){
tableView.register(UINib(nibName: K.CellIdentifier.SideBarNav.faqCell, bundle: nil), forCellReuseIdentifier: K.CellIdentifier.SideBarNav.faqCell)
tableView.delegate = self
tableView.dataSource = self
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.setNavigationBarHidden(false, animated: animated)
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
navigationController?.setNavigationBarHidden(true, animated: animated)
}
}
// MARK: - TableView DataSource , Delegates
extension FaqVC : TableViewSRC{
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 10
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: K.CellIdentifier.SideBarNav.faqCell) as! FaqCell
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 160
}
}