tableView is not showing data from JSON in swift

tableView is not showing data from JSON in swift

By : user2956914
Date : November 22 2020, 03:03 PM
around this issue After your for loop in viewDidLoad is finished, and you got your data, you have to call :
code :

Share : facebook icon twitter icon
TableView Parse Swift data not showing within the app

TableView Parse Swift data not showing within the app

By : user3670995
Date : March 29 2020, 07:55 AM
To fix the issue you can do @DenisE I had the same trouble and your solution of adding self.tableView.reloadData() fixed it. The reason we have to do this is I believe because view is already appeared and data was queried after that, so unless we reload that queried data in view it won't reflect in UI.
Swift TableView not showing any data

Swift TableView not showing any data

By : Isaiah .Morales
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further Did you set the dataSource and delegate for the tableview? If not, you can specify the dataSource, by going to the outlet view:
tableview data not showing properly in swift

tableview data not showing properly in swift

By : Turnerma
Date : March 29 2020, 07:55 AM
this one helps. , this is the working code
code :
 func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {

        let cell =
                withIdentifier: "DetailsCell", for: indexPath) as! AttendanceDetailsTableViewCell

        let row = (indexPath as NSIndexPath).row

        cell.InButton.tag = row

        cell.OutButton.tag = row

        cell.AbsentButton.tag = row

        let maskLayer = CAShapeLayer()

        let bounds = cell.bounds

        maskLayer.path = UIBezierPath(roundedRect: CGRect(x: 5, y: 3, width: bounds.width-15, height: bounds.height-15), cornerRadius: 2).cgPath
        cell.layer.mask = maskLayer


        let attendance = attendanceInfo[row] as AttendanceInfo

           cell.AttendnceLabel.textColor = UIColor(red: CGFloat(0x00)/255
                ,green: CGFloat(0xB1)/255
                ,blue: CGFloat(0xB1)/255
                ,alpha: 1.0)

        if(attendance.inTime == "")&&(attendance.outTime == "")

                cell.InButton.isHidden = false
                cell.OutButton.isHidden = true
                cell.AbsentButton.isHidden = true

            if(attendance.inTime != "")
                cell.InButton.isHidden = true
                cell.OutButton.isHidden = false
                cell.AbsentButton.isHidden = false

            if(attendance.inTime != "") && (attendance.outTime != "")

                cell.InButton.isHidden = true
                cell.OutButton.isHidden = true
                cell.AbsentButton.isHidden = true
                cell.OutLable.text = attendance.outTime

            cell.OutLable.text=" "

            if(attendance.attendance == "PRESENT")

                cell.OutLable.text = attendance.outTime
                cell.OutinfoLabel.text = "Out"

            }else if(attendance.attendance == "ABSENT")
                cell.InButton.isHidden = true
                cell.OutButton.isHidden = true
                cell.AbsentButton.isHidden = true

                cell.OutinfoLabel.text = "Absent11"
                cell.OutLable.text = attendance.updatedTime
                cell.AttendnceLabel.textColor = UIColor.red


            cell.Class.text = attendance.standard

            cell.NameLabel.text = attendance.name

            cell.InLabel.text = attendance.inTime

            cell.AttendnceLabel.text = attendance.attendance

            cell.DateLablel.text = attendance.attendanceDate

            cell.attendanceid = attendance.attendanceId

            cell.backgroundView = UIImageView(image: UIImage(named: "background_common")!)

            cell.Profileimage.image = UIImage(named: "profile_pic")
            cell.Profileimage.downloadImageFrom(link: attendance.photo!, contentMode: UIViewContentMode.scaleAspectFit)

                cell.InButton.setBackgroundImage(UIImage(named: "Check_Box"), for: UIControlState.normal)
                cell.InButton.isSelected = true


                cell.InButton.setBackgroundImage(UIImage(named: "uncheck_Box"), for: UIControlState.normal)
                cell.InButton.isSelected = false

                cell.OutButton.setBackgroundImage(UIImage(named: "Check_Box"), for: UIControlState.normal)
                cell.OutButton.isSelected = true


                cell.OutButton.setBackgroundImage(UIImage(named: "uncheck_Box"), for: UIControlState.normal)
                cell.OutButton.isSelected = false

                cell.AbsentButton.setBackgroundImage(UIImage(named: "Check_Box"), for: UIControlState.normal)
                cell.AbsentButton.isSelected = true


                cell.AbsentButton.setBackgroundImage(UIImage(named: "uncheck_Box"), for: UIControlState.normal)
                cell.AbsentButton.isSelected = false

        return cell

Showing tableView in Xib with data in Swift 3.0

Showing tableView in Xib with data in Swift 3.0

By : 5dsit2
Date : March 29 2020, 07:55 AM
hope this fix your issue here anyview is a uiview which u want to show or hide
extension ViewController : UITableViewDelegate {
code :
    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
        return any view
    func instanceFromNib() -> UIView {
        return UINib(nibName: "Header", bundle: nil).instantiate(withOwner: nil, options: nil)[0] as! UIView
    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
        return 200;
    @IBAction func HideShowView(_ sender: UIButton) {

    if(!isSelected) {
        isSelected = true

        self.mytable.delegate = nil
    else {
          isSelected = false
        self.mytable.estimatedRowHeight = 40
        self.mytable.delegate = self


Swift 4 - DynamoDB data not showing up in TableView

Swift 4 - DynamoDB data not showing up in TableView

By : Kyeongsic Min
Date : March 29 2020, 07:55 AM
will be helpful for those in need ok tried to reload your data after you get your data, for example in your Closure.
You have to reload your data in your main thread like that :
code :
 DispatchQueue.main.async {  
Related Posts Related Posts :
  • CordovaError: Promise rejected with non-error: Error code 65
  • How to append NSMutable strings into a UILabel
  • CustomCell label value does not change
  • Display ad in iAd Bannerview iAd Network
  • Warning: "Could not get traitsetID for iPhone11,6" (Assets.xcassets)
  • Changing root view controller after iOS app has loaded.
  • SocketRocket and iOS certificate pinning
  • Draggable UIButton Snap To a Circle Path
  • Running FireBase in the background
  • resizing UIPopoverController to fit UITableController
  • UICollectionView Exception Crash
  • targeting iOS5 - will it work on iOS6 also?
  • FBLoginView get email
  • Scale UIImages height to UIImageView height
  • Creating a custom progress indicator in ios
  • NSRunLoop API difference
  • Is it possible to inject custom settings into my iOS application "Notifications" settings dialog?
  • UIAlertview not accepting string as message
  • Axis change of stackView giving layout error
  • How to use AVAssetResourceLoader?
  • How to write block definition using properties?
  • iOS connect/reconnect to Bluetooth device when using external-accessory and MFi
  • Saving XMPP Multi User chat messages through XMPP MessageArchiving in iOS
  • Deciding iOS version: pros and cons
  • iOS: Resigned app cannot access keychain through security API
  • How can I set To and Subject fields in an E-Mail being sent by UIDocumentInteractionController?
  • Updating uilabel in view controller underneath another
  • Maximum time Intervel for NSTimer
  • Delete Core Data Entry from Table View Controller
  • How to unload UIViewcontroller from memory?
  • Compressing UIImage as Far as Possible?
  • Optimizing workflow to update internally owned cocoapods dependencies?
  • Formatting an NSDate with Abbreviated Month/Day Names
  • I'm creating a quiz game with 4 answers and I want to add score
  • Tap Gesture to Hide Navigation Bar, Tab Bar, and Status Bar
  • FBSessionStateClosedLoginFailed when I am logged in through Settings
  • CGRect positioning according to center point
  • iOS: Update table view datasource with animations without core data
  • iOS : Where to start for AliPay integration?
  • Routing App Coverage File missing but not needed?
  • Drawing on a zoomable view
  • Append NSStrings and NSNumber to NSMutableArrays and make NSMutable dictionary
  • Terminating app due to uncaught exception 'NSRangeException' when calling dequeueReusableCellWithReuseIdentifier:forInde
  • Collision without physics (Cocos2D + Box2D iOS)
  • Creating a percentage based iOS layout
  • Update tableView row from AppDelegate Swift 4
  • Assigning return value of a class method to a variable error
  • how to display circular progress in delphi ios apps?
  • I can't figure how to fix this Expected identifier or '('
  • How to Test APIs in Swift 4?
  • Link error /Build/Products/Debug-iphonesimulator file not found
  • working with a very large JSON object in iOS
  • Turn off part of the iPhone Screen
  • Phonegap 3.0 app with facebook login using xCode
  • How to add interstitial admob ads to my ios project
  • adding tapku calendar to ios app
  • Add an alertcontroller in a global swift file?
  • Take square image with Cordova (Phonegap) Camera API?
  • Amazon S3 policy allowing only upload not overwrite
  • How to change the UILabel content by tapping?
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org