Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing Manually #23

Open
benjaminhallock opened this issue Aug 25, 2016 · 2 comments
Open

Installing Manually #23

benjaminhallock opened this issue Aug 25, 2016 · 2 comments

Comments

@benjaminhallock
Copy link

You have to change the get image method because it doesn't support your bundle.... I fixed it but still.

@famictech2000
Copy link

How do you do this!?

@darnfish
Copy link

Probably too late but for anyone else wondering, drag the Assets folder somewhere in your project, and then replace the end of the imageForType method starting at let path = Bundle(for: ... with the following:

        guard let imagePath = Bundle.main.path(forResource: fileName, ofType: "png") else { return nil }
        
        let url: URL = .init(fileURLWithPath: imagePath)
        
        do {
            let data = try Data(contentsOf: url)
            
            return UIImage.init(data: data)
        } catch {
            print(error)
        }
        
        return nil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants