jdisho / Papr

🌁 An Unsplash app for iOS
Apache License 2.0
1.15k stars 149 forks source link

Convert all SVG images to PDF #97

Closed serjooo closed 5 years ago

serjooo commented 5 years ago

Closes issue #96

This PR converts all SVG images added for iOS 13 to support SFSymbols to PDF. This way we can still use them as vector images. For each medium/small size and medium/regular weight an image was set in the assets accordingly.

Known issue while working on PR:

App crashes still on iOS 12.2 in the HomeViewController on line 82:

outputs.isRefreshing
.execute { [weak self] isRefreshing in
    if isRefreshing {
        self?.collectionView.scrollToItem(at: IndexPath(item: 0, section: 0), at: .top, animated: false)
        self?.collectionView.setContentOffset(CGPoint(x: 0.0, y: -(self?.refreshControl.frame.height ?? 0.0)), animated: true)
    } else {
        self?.collectionView.setContentOffset(.zero, animated: true)
    }
}
.bind(to: refreshControl.rx.isRefreshing)
.disposed(by: disposeBag)

Commenting out the isRefreshing code solves the problem as the app crashes on scrolling logic.

jdisho commented 5 years ago

Hah! Interesting about the crash. I will have a look 👀