Url Image in Swift
<p>I using the LJWebImage sample project, Which,I found from github on the following link <a href="https://github.com/likumb/LJWebImage" rel="nofollow">https://github.com/likumb/LJWebImage</a>. Project,similar to SDWebImage.I am successfully imported the sample project into my project.I am using collectionView to populating the image from plist which contain number of url links.I am trying pass the collectionView selected cellimage to my imageView but no luck so for.please someone point me the direction.my partial collectionView code below.</p>

<p>Thanks in Advance.</p>

<pre><code>let apps: NSArray = AppInfo.appInfo()

@IBOutlet weak var imageView: UIImageView!

@IBOutlet weak var collectionView: UICollectionView!

override func viewDidLoad() {
    super.viewDidLoad()

          collectionView!.reloadData()
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()

}

// MARK: - CollectionView data source


func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {

    return apps.count
}


func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {


    let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "Cell", for: indexPath as IndexPath) as! Cell

    cell.app = apps[indexPath.row] as? AppInfo

    return cell
}

func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {

   if let filePath = Bundle.main.path(forResource: "apps", ofType: "plist"), 
       let image = UIImage(contentsOfFile: filePath) {
        imageView.contentMode = .scaleAspectFit
        imageView.image = image
    }

    }

}
</code></pre>