FSPagerView icon indicating copy to clipboard operation
FSPagerView copied to clipboard

Support for SwiftUI

Open ngochiencse opened this issue 3 years ago • 5 comments

I have search through swiftui libraries and haven't found any pager view library good enough. Do you have any plan for adding support swiftui for this library? I have used FSPagerView it is very good and I believe should be available on swiftui too.

ngochiencse avatar Jun 30 '21 03:06 ngochiencse

@ngochiencse Did you find any other library to use the image slider?

sathamkhussain avatar Oct 14 '21 14:10 sathamkhussain

@sathamkhussain No, I have to write my own SwiftUI wrapper for FSPagerView in the mean time. You can check this repo: https://github.com/ngochiencse/FSPagerViewExample-SwiftUI. For more detail check my post: https://hienphamit.com/implement-page-view-in-swiftui/

ngochiencse avatar Oct 15 '21 02:10 ngochiencse

@ngochiencse Can you give me how to transform swipe in SwiftUI because i can found to chose the type of FSPagerViewTransformer

like : pagerView.transformer = FSPagerViewTransformer(type: .overlap)

Tarikharda avatar Dec 06 '23 14:12 Tarikharda

I have not implemented this feature yet. I'll notice you when done @Tarikharda

ngochiencse avatar Jan 30 '24 05:01 ngochiencse

With SwiftUI, many libraries should be complete with a convert from UIKit by themself. UIViewController -> UIViewControllerRepresentable UIView -> UIViewRepresentable

-- I tried out that and it's really not too difficult. But we knew Swiftui and uikit bridge were still not yet fluent. It would be best if you built a pager/collection/calendar.. by pure @Swiftui or accepted cases of many bug-related layouts/navigation when using the library from Object-C/UIKit to SwiftUI.

iletai avatar May 07 '24 02:05 iletai