{"id":1526,"url":"https://github.com/horitaku46/Serrata","last_synced_at":"2025-08-02T04:32:29.809Z","repository":{"id":27597565,"uuid":"114209138","full_name":"horitaku46/Serrata","owner":"horitaku46","description":"Slide image viewer library similar to Twitter and LINE.","archived":false,"fork":false,"pushed_at":"2018-09-27T05:10:29.000Z","size":94357,"stargazers_count":324,"open_issues_count":2,"forks_count":27,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-13T18:44:49.078Z","etag":null,"topics":["carthage","cocoapods","image-viewer","images","ios","swift-library","swift4"],"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/horitaku46.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":"2017-12-14T06:01:57.000Z","updated_at":"2025-06-30T20:31:25.000Z","dependencies_parsed_at":"2022-08-07T13:00:40.192Z","dependency_job_id":null,"html_url":"https://github.com/horitaku46/Serrata","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/horitaku46/Serrata","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horitaku46%2FSerrata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horitaku46%2FSerrata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horitaku46%2FSerrata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horitaku46%2FSerrata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/horitaku46","download_url":"https://codeload.github.com/horitaku46/Serrata/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horitaku46%2FSerrata/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268334617,"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":["carthage","cocoapods","image-viewer","images","ios","swift-library","swift4"],"created_at":"2024-01-05T20:15:48.877Z","updated_at":"2025-08-02T04:32:25.294Z","avatar_url":"https://github.com/horitaku46.png","language":"Swift","funding_links":[],"categories":["Media"],"sub_categories":["Image","Other free courses"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/horitaku46/Assets/blob/master/Serrata/banner.png\" width=\"600\"\u003e\n\u003c/p\u003e\n\n[![Platform](http://img.shields.io/badge/platform-iOS-blue.svg?style=flat)](https://developer.apple.com/iphone/index.action)\n![Swift](https://img.shields.io/badge/Swift-4.0-orange.svg)\n[![Cocoapods](https://img.shields.io/badge/Cocoapods-compatible-brightgreen.svg)](https://img.shields.io/badge/Cocoapods-compatible-brightgreen.svg)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-Compatible-brightgreen.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![License](http://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat)](http://mit-license.org)\n\n## Overview\nYou can use it simply by passing the necessary information!  \nSerrata is a UI library that allows you to intuitively view images.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/horitaku46/Assets/blob/master/Serrata/demo_0.gif\" width=\"300\"\u003e\n\u003cimg src=\"https://github.com/horitaku46/Assets/blob/master/Serrata/demo_1.gif\" width=\"300\"\u003e\n\u003cimg src=\"https://github.com/horitaku46/Assets/blob/master/Serrata/demo_2.gif\" width=\"700\"\u003e\n\u003c/p\u003e\n\n## Features\n[Kingfisher](https://github.com/onevcat/Kingfisher) is a lightweight and pure Swift implemented library.  \nIt is used in the Serrata. I sincerely respect Kingfisher!\n\n- Support iPhone, iPad and iPhone X! 🎉\n- It is the almost same as Image Viewer of Twitter and LINE.😎\n\n## Requirements\n\n- Xcode 9.0+\n- iOS 11+\n- Swift 4.0+\n\n## Installation\n#### Caution ⚠️\n[Kingfisher](https://github.com/onevcat/Kingfisher) is installed, too!\n\n### CocoaPods\n```ruby\npod 'Serrata'\n```\n\n### Carthage\n```ruby\ngithub \"horitaku46/Serrata\"\n```\n\n## Usage\n**See [Example](https://github.com/horitaku46/Serrata/tree/master/Example), for more details.**\n\nHow to use in Example.\n\n```swift\nguard let selectedCell = collectionView.cellForItem(at: indexPath) as? ImageCell else {\n    return\n}\n\nlet slideLeafs: [SlideLeaf] = images.enumerated().map { SlideLeaf(image: $0.1,\n                                                                  title: \"Image Title \\($0.0)\",\n                                                                  caption: \"Index is \\($0.0)\") }\n\nlet slideImageViewController = SlideLeafViewController.make(leafs: slideLeafs,\n                                                            startIndex: indexPath.row,\n                                                            fromImageView: selectedCell.imageView)\n\nslideImageViewController.delegate = self // Please watch the following SlideLeafViewControllerDelegate.\npresent(slideImageViewController, animated: true, completion: nil)\n```\n\nDetails of `SlideLeafViewController.make()`.\n\n```swift\n/// This method generates SlideLeafViewController.\n///\n/// - Parameters:\n///   - leafs: It is array to display it by a slide.\n///   - startIndex: It is for initial indication based on array of leafs.\n///   - fromImageView: ImageView of the origin of transition. In the case of nil, CrossDissolve.\n/// - Returns: Instance of SlideLeafViewController.\nopen class func make(leafs: [SlideLeaf], startIndex: Int = 0, fromImageView: UIImageView? = nil) -\u003e SlideLeafViewController {\n    // code...\n}\n```\n\nDetails of `SlideLeaf`.\n\n```swift\nimport UIKit\n\npublic final class SlideLeaf: NSObject {\n\n    public var image: UIImage?\n    public var imageUrlString: String?\n\n    public var title: String\n    public var caption: String\n\n\n    /// If either title and caption is empty, detailView is not displayed.\n    ///\n    /// - Parameters:\n    ///   - image: To read by a slide.\n    ///   - title: Title of the image.\n    ///   - caption: Caption of the image.\n    public init(image: UIImage?, title: String = \"\", caption: String = \"\") {\n        self.image = image\n        self.title = title\n        self.caption = caption\n    }\n\n    /// If either title and caption is empty, detailView is not displayed.\n    ///\n    /// - Parameters:\n    ///   - imageUrlString: To read by a slide. It is displayed by Kingfisher.\n    ///   - title: Title of the image.\n    ///   - caption: Caption of the image.\n    public init(imageUrlString: String?, title: String = \"\", caption: String = \"\") {\n        self.imageUrlString = imageUrlString\n        self.title = title\n        self.caption = caption\n    }\n}\n```\n\n#### delegate\nDetail of `SlideLeafViewControllerDelegate`.\n\n```swift\nextension ViewController: SlideLeafViewControllerDelegate {\n\n    func tapImageDetailView(slideLeaf: SlideLeaf, pageIndex: Int) {\n        // code...\n    }\n\n    func longPressImageView(slideLeafViewController: SlideLeafViewController, slideLeaf: SlideLeaf, pageIndex: Int) {\n        // code...\n    }\n\n    func slideLeafViewControllerDismissed(slideLeaf: SlideLeaf, pageIndex: Int) {\n        // code...\n    }\n}\n```\n\n## Author\n### Takuma Horiuchi\n- [Facebook](https://www.facebook.com/profile.php?id=100008388074028)\n- [Twitter](https://twitter.com/horitaku_)\n- [GitHub](https://github.com/horitaku46)\n\n## Example images from\n- [Unsplash](https://unsplash.com/)\n\n## License\n`Serrata` is available under the MIT license. See the [LICENSE](./LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoritaku46%2FSerrata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoritaku46%2FSerrata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoritaku46%2FSerrata/lists"}