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

Not able to load GIF's #132

Open
vpronaldo opened this issue Feb 23, 2021 · 1 comment
Open

Not able to load GIF's #132

vpronaldo opened this issue Feb 23, 2021 · 1 comment

Comments

@vpronaldo
Copy link

Is there any way to load the Gif's instead of the images in the current framework? I tried loading a gif but it turns out to be a still image.

Can anyone help?

@mvarona
Copy link

mvarona commented Aug 7, 2021

Try to import iOSDevCenters+GIF.swift, drag and drop your gif file to the Resources group within Xcode and use it like this:

OnboardingItemInfo(informationImage: UIImage.gifImageWithName("onboarding_1") ?? UIImage(),
								title: NSLocalizedString("OnboardingPage1Title", comment: ""),
								description: NSLocalizedString("OnboardingPage1Desc", comment: ""),
								pageIcon: UIImage.init(named: "onboarding1_icon") ?? UIImage(),
								color: UIColor.white,
								titleColor: UIColor.black,
								descriptionColor: UIColor.black,
								titleFont: UIFont.boldSystemFont(ofSize: 28),
								descriptionFont: UIFont.systemFont(ofSize: 18)),

In case you notice it a bit slow, you can reduce the delay on the GIF animation at iOSDevCenters+GIF.swift:65.

Hope it helps!

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

2 participants