{"id":31533591,"url":"https://github.com/sukov/pagedmediaviewer","last_synced_at":"2025-10-04T04:56:02.857Z","repository":{"id":315818828,"uuid":"1060922199","full_name":"sukov/PagedMediaViewer","owner":"sukov","description":"Elegant media display library, comparable to native Photos app, supporting both images and videos.","archived":false,"fork":false,"pushed_at":"2025-09-30T21:20:30.000Z","size":206,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-30T22:09:55.608Z","etag":null,"topics":["interactive-transition","ios-photos","media-viewer-library","presentationcontroller","swift","swift-package-manager","transition-animation","uikit","uipageviewcontroller","uiviewcontrolleranimatedtransitioning","uiviewcontrollerinteractivetransitioning","uiviewcontrollertransitioningdelegate","zooming-panning-moving"],"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/sukov.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-20T21:41:42.000Z","updated_at":"2025-09-30T21:20:34.000Z","dependencies_parsed_at":"2025-09-21T00:22:35.888Z","dependency_job_id":null,"html_url":"https://github.com/sukov/PagedMediaViewer","commit_stats":null,"previous_names":["sukov/pagedmediaviewer"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sukov/PagedMediaViewer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukov%2FPagedMediaViewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukov%2FPagedMediaViewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukov%2FPagedMediaViewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukov%2FPagedMediaViewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sukov","download_url":"https://codeload.github.com/sukov/PagedMediaViewer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukov%2FPagedMediaViewer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278266888,"owners_count":25958733,"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-10-04T02:00:05.491Z","response_time":63,"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":["interactive-transition","ios-photos","media-viewer-library","presentationcontroller","swift","swift-package-manager","transition-animation","uikit","uipageviewcontroller","uiviewcontrolleranimatedtransitioning","uiviewcontrollerinteractivetransitioning","uiviewcontrollertransitioningdelegate","zooming-panning-moving"],"created_at":"2025-10-04T04:56:01.049Z","updated_at":"2025-10-04T04:56:02.842Z","avatar_url":"https://github.com/sukov.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PagedMediaViewer\n\n[![Version](https://img.shields.io/cocoapods/v/PagedMediaViewer.svg?style=flat)](https://cocoapods.org/pods/PagedMediaViewer)\n[![License](https://img.shields.io/cocoapods/l/PagedMediaViewer.svg?style=flat)](https://cocoapods.org/pods/PagedMediaViewer)\n[![Language Swift](https://img.shields.io/badge/Language-Swift%205.0-orange.svg?style=flat)](https://swift.org)\n[![Platform](https://img.shields.io/cocoapods/p/PagedMediaViewer.svg?style=flat)](https://cocoapods.org/pods/PagedMediaViewer)\n[![Swift Package Manager](https://img.shields.io/badge/Swift_Package_Manager-compatible-orange?style=flat)](https://www.swift.org/package-manager)\n\n## Features\n\nPagedMediaViewer is an elegant media display library, comparable to native Photos app, supporting both images and videos.\n\n  - [x] Smooth thumbnail-to-fullscreen interactive transition with return animation\n  - [x] Fullscreen display of any custom (media) view conforming to `PagedMediaItem` protocol\n  - [x] Configurable header, footer, and playback controls\n  - [x] Double tap \u0026 pinch to zoom with auto-hiding UI elements\n  - [x] Adjustable presentation insets to allow underlying views to remain visible (e.g. promotional content)\n  - [x] Comprehensive Unit \u0026 UI Test Coverage\n  - [x] [Complete Documentation](https://sukov.github.io/PagedMediaViewer/)\n\n## Demo\n\n| Image transition | Video transition \u0026 zoom | Media items pagination |\n|:---:|:---:|:---:|\n|![1](https://github.com/user-attachments/assets/233f6227-7f1e-425a-8709-d6489281f35d)|![2](https://github.com/user-attachments/assets/936afb3a-9b76-4350-87ee-2d41106a350c)|![3](https://github.com/user-attachments/assets/2615ed42-f788-437a-8d5e-920a51597f02)|\n\nThe previews are from the example project. To run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Usage \n\n### Quick Start\n\nCheck [PagedMediaViewControllerExample.swift](Example/PagedMediaViewer/PagedMediaViewControllerExample.swift) `PagedMediaDataSource` and `PagedMediaDelegate` implementation from the Example project.\n\n### PagedMediaItem protocol\n\nMedia item to be presented in the PagedMediaViewController.\n\n```Swift\npublic protocol PagedMediaItem: UIView {\n    /// Updates paused state depending on the transition status.\n    var paused: Bool { get set }\n    /// Whether the item is animated (video, gif, etc) or static (image, etc).\n    var isAnimated: Bool { get }\n    /// Used in the last part of the dismissal transition for animated items (if not `nil`) for smooth effect. Defaults to `nil`.\n    var animatedItemSnapshotAtCurrentTime: UIImage? { get }\n    /// Controls for play/pause and scrubbing.  Defaults to `nil`.\n    var animatedItemControlsView: UIView? { get }\n}\n```\n\n### PagedMediaDataSource protocol\n\nConform to `PagedMediaDataSource` to provide media items and customize their presentation.\n\n```Swift\npublic protocol PagedMediaDataSource: AnyObject {\n    /// Number of items to be presented.\n    func numberOfItems(in pagedMediaViewController: PagedMediaViewController) -\u003e Int\n    /// Adds insets  on `PagedMediaViewController`'s view presentation frame. Defaults to `.zero`. Useful for preventing presentation over promotional content.\n    func presentationViewInsets(for pagedMediaViewController: PagedMediaViewController) -\u003e UIEdgeInsets\n    /// Provides the media item view for the given index.\n    func pagedMediaViewController(_ pagedMediaViewController: PagedMediaViewController, pagedMediaViewForItemAt index: Int) -\u003e PagedMediaItem\n    /// Provides the original view for the given index. Used for transition animations.\n    func pagedMediaViewController(_ pagedMediaViewController: PagedMediaViewController, originalViewForItemAt index: Int) -\u003e UIView\n    /// Optional method for specifying the original image for the view or a snapshot. By default `PagedMediaTransitionDriver` will create a snapshot from the original view.\n    func pagedMediaViewController(_ pagedMediaViewController: PagedMediaViewController, transitionImageForItemAt index: Int) -\u003e UIImage?\n}\n```\n\n### PagedMediaDelegate protocol\n\nOptional: Conform to `PagedMediaDelegate` for transition and item change events.\n\n```Swift\npublic protocol PagedMediaDelegate: AnyObject {\n    /// Called just before the transition to a new item begins. Useful for centering table/collection view items behind the scenes for proper transition animation.\n    func pagedMediaViewController(_ pagedMediaViewController: PagedMediaViewController, willTransitionTo index: Int)\n    /// Called after the transition to a new item is completed.\n    func pagedMediaViewController(_ pagedMediaViewController: PagedMediaViewController, didTransitionTo toIndex: Int, fromIndex: Int)\n    /// Called just before the transition ends. Perfect time to unpause the original view at index.\n    func pagedMediaViewController(_ pagedMediaViewController: PagedMediaViewController,\n                                     willDismissToOriginalViewAt index: Int,\n                                     fromPagedMediaItem mediaItem: PagedMediaItem)\n}\n```\n\n## Requirements\n\n- iOS 13.0+\n- Xcode 12.0+\n- Swift 5.0+\n\n\n## Installation\n\n### CocoaPods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:\n\n```bash\n$ gem install cocoapods\n```\n\nTo integrate PagedMediaViewer into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '13.0'\nuse_frameworks!\n\ntarget '\u003cYour Target Name\u003e' do\n    pod 'PagedMediaViewer'\nend\n```\n\nThen, run the following command:\n\n```bash\n$ pod install\n```\n\n### Swift Package Manager\n\nThe [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. \n\nOnce you have your Swift package set up, adding `PagedMediaViewer` as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/sukov/PagedMediaViewer.git\", .upToNextMajor(from: \"1.0.1\"))\n]\n```\n\n## Author\n\nsukov, gorjan.shukov@gmail.com\n\n## License\n\nPagedMediaViewer is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsukov%2Fpagedmediaviewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsukov%2Fpagedmediaviewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsukov%2Fpagedmediaviewer/lists"}