Untitled

mail@pastecode.io avatar
unknown
swift
2 months ago
1.4 kB
2
Indexable
Never
//
//  ShowMessageLikesVC.swift
//  JILLII
//
//  Created by Ashish Parmar on 08/04/24.
//

import UIKit

class ShowMessageLikesVC: UIViewController {

    @IBOutlet weak var tblLikes : UITableView!
    
    var likeData : [ReplyOwnerDetails]?
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.tblLikes.register(UINib(nibName: "ContactDetailTblCell", bundle: nil), forCellReuseIdentifier: "ContactDetailTblCell")
    }
 
    @IBAction func tapOnClose(_ sender : UIButton){
        self.dismiss(animated: true)
    }
    
}

//MARK: - UITABLEVIEW DELEGATE AND DATASOURCE

extension ShowMessageLikesVC : UITableViewDelegate , UITableViewDataSource {
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return ToInt(self.likeData?.count)
    }
    
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCell(withIdentifier: "ContactDetailTblCell", for: indexPath) as! ContactDetailTblCell
        let likeUserData = self.likeData?[indexPath.row]
        cell.imgUserProfile.setImage(strUrl: ToString(likeUserData?.image), placeholder: UIImage(named: "User_PlaceHolder")!)
        cell.lblUserName.text = likeUserData?.username
        cell.lblContactInfo.isHidden = true
        cell.btnRadio.isHidden = true
        return cell
    } 
}
Leave a Comment