{"id":2804,"url":"https://github.com/fortmarek/SwipeViewController","last_synced_at":"2025-08-03T12:31:12.789Z","repository":{"id":56922381,"uuid":"54213913","full_name":"fortmarek/SwipeViewController","owner":"fortmarek","description":"SwipeViewController is a Swift modification of RKSwipeBetweenViewControllers - navigate between pages / ViewControllers","archived":false,"fork":false,"pushed_at":"2019-06-16T11:10:01.000Z","size":279,"stargazers_count":654,"open_issues_count":11,"forks_count":46,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-06-29T03:42:52.696Z","etag":null,"topics":["navigationbar","swipeviewcontroller"],"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/fortmarek.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":"2016-03-18T15:58:15.000Z","updated_at":"2025-03-15T15:49:12.000Z","dependencies_parsed_at":"2022-08-21T05:20:10.504Z","dependency_job_id":null,"html_url":"https://github.com/fortmarek/SwipeViewController","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/fortmarek/SwipeViewController","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortmarek%2FSwipeViewController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortmarek%2FSwipeViewController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortmarek%2FSwipeViewController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortmarek%2FSwipeViewController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fortmarek","download_url":"https://codeload.github.com/fortmarek/SwipeViewController/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortmarek%2FSwipeViewController/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267653522,"owners_count":24122229,"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-07-29T02:00:12.549Z","response_time":2574,"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":["navigationbar","swipeviewcontroller"],"created_at":"2024-01-05T20:16:23.286Z","updated_at":"2025-08-03T12:31:12.449Z","avatar_url":"https://github.com/fortmarek.png","language":"Swift","funding_links":[],"categories":["UI"],"sub_categories":["Tab Bar","Layout","Other free courses"],"readme":"# SwipeViewController\n\n[![CI Status](http://img.shields.io/travis/fortmarek/SwipeViewController.svg?style=flat)](https://travis-ci.org/fortmarek/SwipeViewController)\n[![Version](https://img.shields.io/cocoapods/v/SwipeViewController.svg?style=flat)](http://cocoapods.org/pods/SwipeViewController)\n[![License](https://img.shields.io/cocoapods/l/SwipeViewController.svg?style=flat)](http://cocoapods.org/pods/SwipeViewController)\n[![Platform](https://img.shields.io/cocoapods/p/SwipeViewController.svg?style=flat)](http://cocoapods.org/pods/SwipeViewController)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\n## What is SwipeViewController?\n\nSwipeViewController enables you to modify the navigation bar and implement 'Swipe Buttons' that can user switch pages with and also the user can easily see which page he is on.\nSwipeViewController is a modification of Objective-C project RKSwipeBetweenViewControllers. I have not only converted the syntax to Swift but added some more functionality and some other minor changes.\n\n![demo](http://imgur.com/SDIkf4b.gif)\n\n## Installation\n\n### CocoaPods\n\nSwipeViewController is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'SwipeViewController'\n```\n\n### Carthage\n\nIf you use Carthage, add this to your Cartfile:\n\n```ruby\ngithub \"fortmarek/SwipeViewController\"\n```\n\n### Manually\n\nInclude the Pod/Classes/SwipeViewController.swift files into your project.\n\n## Usage\n\nYou can init SwipeViewController simply like this:\n```swift \nlet myViewControllerOne = UIViewController() \nlet myViewControllerTwo = UIViewController()\nlet navigationController = SwipeViewController(pages: [myViewControllerOne, myViewControllerTwo])\n```\n\nTo set the titles of the buttons, you just need to change the title of each page:\n```swift \nmyViewControllerOne.title = \"Recent\"\n```\nThis should be done before passing your view controller into the init method of `SwipeViewController`.\n\nTo specify which view controller should be selected first:\n```swift \n// Selecting second view controller as the first\nswipeViewController.startIndex = 1\n```\n\n### NavigationBar\n\nTo change color of the NavigationBar:\n\n```swift \nswipeViewControler.navigationBarColor = UIColor.blue\n```\n\nYou can also include barButtonItems, simply create UIBarButtonItem as you would normally do and then use it like this:\n\n```swift \nlet barButtonItem = UIBarButtonItem(barButtonSystemItem: .Add, target: self, action: nil)\nleftBarButtonItem = barButtonItem\n```\n\nNote this should be done probably in `viewDidLoad` (definitely before the view appears).\n\n### SwipeButtons\n\nThere are two different modes - either every button has the same space on each side not depending on the label size (good for odd numbers)\n```swift \nswipeViewController.equalSpaces = true\n```\n\nor the spaces on each differ depending on the label size (good for even numbers, the label is always centered). \n```swift \nswipeViewController.equalSpaces = false\n```\n\nYou can also customize buttons with these properties:\n```swift \nbuttonFont, buttonColor, selectedButtonColor\n```\n\nTo change the offsets on the side and on the bottom:\n\n```swift \nswipeViewController.offset = 40 // offset from the side\nswipeViewController.bottomOffset = 5 // offset from the bottom\n```\n\nInstead of titles as labels you can use images. First init the button using SwipeButtonWithImage struct:\n\n```swift\nlet buttonOne = SwipeButtonWithImage(image: UIImage(named: \"Hearts\"), selectedImage: UIImage(named: \"YellowHearts\"), size: CGSize(width: 40, height: 40))\nswipeViewController.buttonsWithImages = [buttonOne, buttonTwo, buttonThree]\n```\n\n### SelectionBar\n\nTo customize selection bar, you can change these properties:\n\n```swift \nselectionBarHeight, selectionBarWidth, selectionBarColor\n```\n\n### Additional customization\n\nIf you want to customize it even more, you can go right to the the SwipeViewController class file but be careful.\n\n## Author\n\nfortmarek, marekfort@me.com\n\n## License\n\nSwipeViewController 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%2Ffortmarek%2FSwipeViewController","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffortmarek%2FSwipeViewController","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffortmarek%2FSwipeViewController/lists"}