{"id":1538,"url":"https://github.com/boraseoksoon/BSZoomGridScrollView","last_synced_at":"2025-08-02T04:31:50.858Z","repository":{"id":56903299,"uuid":"222463693","full_name":"boraseoksoon/BSZoomGridScrollView","owner":"boraseoksoon","description":"Fun GridScrollView written in SwiftUI + Combine, bridging between UIKit","archived":false,"fork":false,"pushed_at":"2021-04-06T20:43:19.000Z","size":12793,"stargazers_count":163,"open_issues_count":0,"forks_count":12,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-27T12:49:57.863Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boraseoksoon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-18T14:06:51.000Z","updated_at":"2025-06-20T13:25:19.000Z","dependencies_parsed_at":"2022-08-20T18:50:38.993Z","dependency_job_id":null,"html_url":"https://github.com/boraseoksoon/BSZoomGridScrollView","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/boraseoksoon/BSZoomGridScrollView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boraseoksoon%2FBSZoomGridScrollView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boraseoksoon%2FBSZoomGridScrollView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boraseoksoon%2FBSZoomGridScrollView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boraseoksoon%2FBSZoomGridScrollView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boraseoksoon","download_url":"https://codeload.github.com/boraseoksoon/BSZoomGridScrollView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boraseoksoon%2FBSZoomGridScrollView/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268334613,"owners_count":24233793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:15:49.255Z","updated_at":"2025-08-02T04:31:47.999Z","avatar_url":"https://github.com/boraseoksoon.png","language":"Swift","funding_links":[],"categories":["Media","Grid"],"sub_categories":["Image","Content"],"readme":"# BSZoomGridScrollView\n\nBSZoomGridScrollView is a powerful, pure swift iOS UI framework that provides the awesome grid scrollview containing your image array that are able to zoom, tracking your touch area.\u003cbr\u003e\n\nScreenshots\n-----------\n\n[Click to watch how it works in youtube](https://youtu.be/QTB7GqZL-L8)\n\n\u003cbr\u003e\n\n![Alt Text](https://media.giphy.com/media/gF23Vtbn9bCTosr1yn/giphy.gif)\n\n![BSZoomGridScrollView Screenshot](https://firebasestorage.googleapis.com/v0/b/boraseoksoon-ff7d3.appspot.com/o/BSZoomGridScrollView%2Fs4.png?alt=media\u0026token=111d96f0-317c-49f0-b115-fb1592ab6299)\n\n\nAt a Glance\n-----------\n\n```swift\n\nvar body: some View {\n    /// 😊 That's it.\n    BSZoomGridScrollView(imagesToZoom: imagesToZoom,\n                         powerOfZoomBounce: .regular,\n                         numberOfColumns: 200,\n                         numberOfRows: 10,\n                         didLongPressItem: { selectedImage in\n                            print(\"on long press : \", selectedImage)\n                            /// Grab an image user end up choosing.\n                            self.selectedImage = selectedImage\n                            \n                            /// Present!\n                            self.showSelectedImageView.toggle()\n                         },\n                         didFinishDraggingOnItem: { selectedImage in\n                            print(\"on drag finish : \", selectedImage)\n    })\n    .edgesIgnoringSafeArea(.all)\n    .sheet(isPresented:self.$showSelectedImageView) {\n        /// The example view showing a picked up image.\n        ShowingSelectedImageView(selectedImage: self.selectedImage)\n    }\n}\n```\n\n## Features\n\n- [x] Designed for SwiftUI, SwiftUI 100% is supported.\n- [x] Complex grid ScrollView UI is provided out of box.\n- [x] Tracking user touch area on the grid scrollview, Zooming items is done out of box.\n- [x] BSZoomGridScrollView will return an image selected by a user, detected by the internal long press and pan gesture inside out of box. \n- [x] Grid UI can be styled for number of columns, rows, zoom effect and images you would like to input to show in the grid.\n\n\u003cbr\u003e\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\nIt includes examples for UIKit as well as SwiftUI.\n\n## Requirements\n\n- iOS 13.0 or later\n- Swift 5.0 or later\n- Xcode 11.0 or later\n\n\nGetting Started\n--------------- \n\n* SwiftUI\n\n```Swift\nimport SwiftUI\n\n/// 🥳 # Step1: let's import!\nimport BSZoomGridScrollView\n\nstruct ContentView: View {\n    var itemsToZoom: [UIImage] = {\n        var images = [UIImage]()\n        for i in 0...29 {\n            images.append(UIImage(named: \"yourImage\\(i)\") ?? UIImage())\n        }\n        return images\n    }()\n    \n    var body: some View {\n        /// 😊 # Step2. That's it. completed!\n        BSZoomGridScrollView(itemsToZoom: itemsToZoom,\n                             powerOfZoomBounce: .regular,\n                             isBeingDraggingOnItem:{ selectedImage in\n                                ///\n                             },\n                             didLongPressItem: { selectedImage in\n                                /// Grab an image user ends up choosing.\n                             },\n                             didFinishDraggingOnItem: { selectedImage in\n                                /// Grab an image user ends up choosing.\n        })\n        .edgesIgnoringSafeArea(.all)\n    }\n}\n```\n\n* UIKit\n```Swift\n///\n/// To use BSZoomGridScrollView,\n/// Please, Follow steps written in the comments with icon like 😀.\n///\n\nimport SwiftUI\nimport UIKit\n\n///\n// 😚 #Step1: import BSZoomGridScrollView!\n///\nimport BSZoomGridScrollView\n\nclass ViewController: UIViewController {\n    \n    ///\n    // 😋 #Step2: declare BSZoomGridScrollView\n    ///\n    private lazy var zoomGridScrollViewController: BSZoomGridScrollViewController = { [unowned self] in\n        ///\n        /// It can be used on both SwiftUI and UIKit.\n        /// To see how it works on SwiftUI,\n        /// please refer to comments in SwiftUI directory -\u003e ContentView.swift\n        ///\n        return BSZoomGridScrollViewController(itemsToZoom: self.itemsToZoom,\n                                              powerOfZoomBounce: .regular,\n                                              scrollEnableButtonTintColor: .black,\n                                              scrollEnableButtonBackgroundColor: .white,\n                                              isBeingDraggingOnItem:{ [unowned self] selectedImage in\n                                                 ///\n                                              },\n                                              didLongPressItem: { [unowned self] selectedImage in\n                                                /// Grab an image user end up choosing.\n                                              },\n                                              didFinishDraggingOnItem: { [unowned self] selectedImage in\n                                                /// on drag finished\n                                              })\n    }()\n    \n    ///\n    // prepare any item array to feed to BSZoomGridScrollViewController.\n    ///\n    private var itemsToZoom: [Any] = {\n        var images = [UIImage]()\n        for i in 0...29 {\n            images.append(UIImage(named: \"s\\(i)\") ?? UIImage())\n        }\n        return images\n    }()\n    \n    ///\n    // 😁 #Step3: Present it!\n    ///\n    @IBAction func goToBSZoomGridScrollView(_ sender: Any) {\n        ///\n        // 😎 That's all. well done.\n        ///\n        \n        self.present(UINavigationController(rootViewController: zoomGridScrollViewController),\n                     animated: true,\n                     completion: nil)\n    }\n    \n    ///\n    // MARK: - ViewController LifeCycle Methods\n    ///\n    override func viewDidLoad() {\n        super.viewDidLoad()\n    }\n\n    override func didReceiveMemoryWarning() {\n        super.didReceiveMemoryWarning()\n    }\n}\n\n```\n\n## Installation\n\nThere are four ways to use BSZoomGridScrollView in your project:\n- using CocoaPods\n- using Swift Package Manager\n- manual install (build frameworks or embed Xcode Project)\n\n### Installation with CocoaPods\n\n[CocoaPods](http://cocoapods.org/) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries in your projects. See the [Get Started](http://cocoapods.org/#get_started) section for more details.\n\n#### Podfile\n\nFirst, \n```ruby\npod 'BSZoomGridScrollView'\n```\nthen in your root project,\n```ruby\npod install\n```\n\n### Installation with Swift Package Manager (Xcode 11+)\n\n[Swift Package Manager](https://swift.org/package-manager/) (SwiftPM) is a tool for managing the distribution of Swift code as well as C-family dependency. From Xcode 11, SwiftPM got natively integrated with Xcode.\n\nBSZoomGridScrollView support SwiftPM from version 5.1.0. To use SwiftPM, you should use Xcode 11 to open your project. Click `File` -\u003e `Swift Packages` -\u003e `Add Package Dependency`, enter [BSZoomGridScrollView repo's URL](https://github.com/boraseoksoon/BSZoomGridScrollView). Or you can login Xcode with your GitHub account and just type `BSZoomGridScrollView` to search.\n\nAfter select the package, you can choose the dependency type (tagged version, branch or commit). Then Xcode will setup all the stuff for you.\n\nIf you're a framework author and use BSZoomGridScrollView as a dependency, update your `Package.swift` file:\n\n```swift\nlet package = Package(\n    dependencies: [\n        .package(url: \"https://github.com/boraseoksoon/BSZoomGridScrollView\", from: \"0.1.1\")\n    ],\n    // ...\n)\n```\n## Disclamer\n\nIt was done for my fun. \n\n## Author\n\nboraseoksoon@gmail.com\n\n## License\n\nBSZoomGridScrollView is available under the MIT license. See the LICENSE file for more info.\n\n\n## References \n\n[Observable](https://apps.apple.com/us/app/observable/id1488022000?ls=1) : \nPhotos browsing iOS app where you can download the photos for free as you like.\n\n\u003cimg align=\"left\" width=\"240\" height=\"428\" src=\"https://firebasestorage.googleapis.com/v0/b/boraseoksoon-ff7d3.appspot.com/o/BSZoomGridScrollView%2Fo1.png?alt=media\u0026token=f5003b58-f10f-4858-bb27-f4b0e06f6f70\"\u003e\n\u003cimg align=\"left\" width=\"240\" height=\"428\" src=\"https://firebasestorage.googleapis.com/v0/b/boraseoksoon-ff7d3.appspot.com/o/BSZoomGridScrollView%2Fo2.png?alt=media\u0026token=6374ba2c-0e58-478f-81a8-11eb5a5662e2\"\u003e\n\u003cimg align=\"left\" width=\"240\" height=\"428\" src=\"https://firebasestorage.googleapis.com/v0/b/boraseoksoon-ff7d3.appspot.com/o/BSZoomGridScrollView%2Fo4.png?alt=media\u0026token=11e22574-b854-45bf-a0a3-4b0c596db3f9\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboraseoksoon%2FBSZoomGridScrollView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboraseoksoon%2FBSZoomGridScrollView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboraseoksoon%2FBSZoomGridScrollView/lists"}