0

This is my code creating a UITableView using storyboard hten i update my ViewController.swift file like this. Its working fine in when i run it in simulator, but i an facing an error at the time of i run it in my device

ViewController.swift

import UIKit
class ViewController: UIViewController,UITableViewDelegate,UITableViewDataSource {
@IBOutlet weak var tableViewObject: UITableView!
var foodNames: [String] = ["Food1","Food2","Food3","Food4","Food5","Food6","Food7","Food8"];
var foodImages: [String] = ["image1", "image2", "image3","image4","image5","image6","image7","image8"];


func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int
{
    return foodNames.count
}



func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
{
    let cell:UITableViewCell=UITableViewCell(style: UITableViewCellStyle.Subtitle, reuseIdentifier: "mycell")
    cell.textLabel.text = foodNames[indexPath.row]

    var image : UIImage = UIImage(named: foodImages[indexPath.row])!
    cell.imageView.image = image
    cell.imageView.sizeToFit()

    return cell
}


override func viewDidLoad()
{
    super.viewDidLoad()
}
}

I am facing this error shown below enter image description here

S P Balu Kommuri
  • 890
  • 10
  • 28

1 Answers1

0

From your loge: dylib library not loaded libSwiftCore.

This means that you have issue with Frameworks(dynamic libraries).

Please check followin SO link

I think you will find which is your case. Hope this will help.

Community
  • 1
  • 1
David V
  • 2,134
  • 1
  • 16
  • 22