Skip to content

Commit

Permalink
Merge pull request #796 from airbnb/btw/designable
Browse files Browse the repository at this point in the history
Fix for storyboard crash
  • Loading branch information
buba447 committed Mar 18, 2019
2 parents 883239a + 7cf5ad5 commit a7dcc36
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Example/lottie-swift/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<!--View Controller-->
<scene sceneID="ufC-wZ-h7g">
<objects>
<viewController id="vXZ-lx-hvc" customClass="ViewController" customModule="lottie_swift_Example" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="vXZ-lx-hvc" customClass="ViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
<viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
Expand Down
7 changes: 7 additions & 0 deletions lottie-swift/src/Public/Animation/AnimationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,13 @@ final public class AnimationView: LottieView {
commonInit()
}

public override init(frame: CGRect) {
self.animation = nil
self.imageProvider = BundleImageProvider(bundle: Bundle.main, searchPath: nil)
super.init(frame: .zero)
commonInit()
}

required init?(coder aDecoder: NSCoder) {
self.imageProvider = BundleImageProvider(bundle: Bundle.main, searchPath: nil)
super.init(coder: aDecoder)
Expand Down

0 comments on commit a7dcc36

Please sign in to comment.