Previous developer using R.swift
to load resources.
And I delete it from Cocoapods, then I using
let image = UIImage.init(named: "testimage")
to load image from xcassets, and it return nil
.
And I load testimage in xib, it works.
I have no idea why I can't load resources from xcassets by using code.
Just use:
let image = UIImage(named: "imageNameInAssets")