All Projects → fortmarek → Swipeviewcontroller

fortmarek / Swipeviewcontroller

Licence: mit
SwipeViewController is a Swift modification of RKSwipeBetweenViewControllers - navigate between pages / ViewControllers

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Swipeviewcontroller

LLNavigationController
This is a subClass Of UINavigationController.本导航条继承UINavigationController,自定义滑动返回手势与滑动动画,同时可自定义过场动画,解决了手势共存时的冲突。在系统类的基础上进行扩展,节约性能,无任何代码耦合度,可随时集成与剥离。支持iOS7以上系统,兼容iOS11,版本稳定。
Stars: ✭ 20 (-96.86%)
Mutual labels:  navigationbar
WaveSideBar
Animated side bar view
Stars: ✭ 38 (-94.03%)
Mutual labels:  navigationbar
Convex bottom bar
A Flutter package which implements a ConvexAppBar to show a convex tab in the bottom bar. Theming supported.
Stars: ✭ 345 (-45.75%)
Mutual labels:  navigationbar
wx-mini-navigationbar
微信小程序自定义标题栏
Stars: ✭ 20 (-96.86%)
Mutual labels:  navigationbar
StackBarButtonItem
🔲 StackBarButtonItem can use BarButtonItem like StackView
Stars: ✭ 55 (-91.35%)
Mutual labels:  navigationbar
Wrnavigationbar
超简单!!! 一行代码设置状态栏、导航栏按钮、标题、颜色、透明度,移动等 WRNavigationBar which allows you to change NavigationBar's appearance dynamically
Stars: ✭ 2,923 (+359.59%)
Mutual labels:  navigationbar
BottomNavigationBar
A light bottom navigation bar in Android supporting Tint mode.
Stars: ✭ 48 (-92.45%)
Mutual labels:  navigationbar
Uiwidget
一个集成TabLayout、UIAlertDialog、UIActionSheetDialog、UIProgressDialog、TitleBarView(自带沉浸式标题栏)、CollapsingTitleBarLayout、RadiusView(圆角及状态背景设置View解放shape文件)、KeyboardHelper(软键盘控制及遮挡控制类)、StatusViewHelper(状态栏沉浸帮助类)、NavigationViewHelper(导航栏沉浸式帮助类)、AlphaViewHelper(View透明度控制帮助类) 等项目常用UI库
Stars: ✭ 400 (-37.11%)
Mutual labels:  navigationbar
Fluent-Design
Microsoft's Fluent Design with pure HTML/CSS/JS
Stars: ✭ 36 (-94.34%)
Mutual labels:  navigationbar
Eachnavigationbar
A custom navigation bar for each view controller.
Stars: ✭ 314 (-50.63%)
Mutual labels:  navigationbar
angular-scrollspy
A simple lightweight library for Angular which automatically updates links to indicate the currently active section in the viewport
Stars: ✭ 34 (-94.65%)
Mutual labels:  navigationbar
react-native-detect-navbar-android
React Native module that tells if android device has soft navigation bar.
Stars: ✭ 14 (-97.8%)
Mutual labels:  navigationbar
Google nav bar
A modern google style nav bar for flutter.
Stars: ✭ 290 (-54.4%)
Mutual labels:  navigationbar
react-native-floating-action-bar
A React Native floating action bar.
Stars: ✭ 39 (-93.87%)
Mutual labels:  navigationbar
Tlyshynavbar
Unlike all those arrogant UINavigationBar, this one is shy and humble! Easily create auto-scrolling navigation bars!
Stars: ✭ 3,780 (+494.34%)
Mutual labels:  navigationbar
WXNavigationBar
Handle UINavigationBar like WeChat. Simple and easy to use.
Stars: ✭ 116 (-81.76%)
Mutual labels:  navigationbar
IRBottomNavigationView
Floating Bottom Navigation/Tab System
Stars: ✭ 48 (-92.45%)
Mutual labels:  navigationbar
Wrnavigationbar swift
WRNavigationBar which allows you to change NavigationBar's appearance dynamically
Stars: ✭ 576 (-9.43%)
Mutual labels:  navigationbar
Easynavigation
一款超级简单的导航条管理工具。完全自定义导航条。没有UINavigationBar 和 UINavigationItem 这两个类。完全是对UIView的操作。
Stars: ✭ 393 (-38.21%)
Mutual labels:  navigationbar
Kmnavigationbartransition
A drop-in universal library helps you to manage the navigation bar styles and makes transition animations smooth between different navigation bar styles while pushing or popping a view controller for all orientations. And you don't need to write any line of code for it, it all happens automatically.
Stars: ✭ 3,274 (+414.78%)
Mutual labels:  navigationbar

SwipeViewController

CI Status Version License Platform Carthage compatible

What is SwipeViewController?

SwipeViewController 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. SwipeViewController 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.

demo

Installation

CocoaPods

SwipeViewController is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'SwipeViewController'

Carthage

If you use Carthage, add this to your Cartfile:

github "fortmarek/SwipeViewController"

Manually

Include the Pod/Classes/SwipeViewController.swift files into your project.

Usage

You can init SwipeViewController simply like this:

let myViewControllerOne = UIViewController() 
let myViewControllerTwo = UIViewController()
let navigationController = SwipeViewController(pages: [myViewControllerOne, myViewControllerTwo])

To set the titles of the buttons, you just need to change the title of each page:

myViewControllerOne.title = "Recent"

This should be done before passing your view controller into the init method of SwipeViewController.

To specify which view controller should be selected first:

// Selecting second view controller as the first
swipeViewController.startIndex = 1

NavigationBar

To change color of the NavigationBar:

swipeViewControler.navigationBarColor = UIColor.blue

You can also include barButtonItems, simply create UIBarButtonItem as you would normally do and then use it like this:

let barButtonItem = UIBarButtonItem(barButtonSystemItem: .Add, target: self, action: nil)
leftBarButtonItem = barButtonItem

Note this should be done probably in viewDidLoad (definitely before the view appears).

SwipeButtons

There are two different modes - either every button has the same space on each side not depending on the label size (good for odd numbers)

swipeViewController.equalSpaces = true

or the spaces on each differ depending on the label size (good for even numbers, the label is always centered).

swipeViewController.equalSpaces = false

You can also customize buttons with these properties:

buttonFont, buttonColor, selectedButtonColor

To change the offsets on the side and on the bottom:

swipeViewController.offset = 40 // offset from the side
swipeViewController.bottomOffset = 5 // offset from the bottom

Instead of titles as labels you can use images. First init the button using SwipeButtonWithImage struct:

let buttonOne = SwipeButtonWithImage(image: UIImage(named: "Hearts"), selectedImage: UIImage(named: "YellowHearts"), size: CGSize(width: 40, height: 40))
swipeViewController.buttonsWithImages = [buttonOne, buttonTwo, buttonThree]

SelectionBar

To customize selection bar, you can change these properties:

selectionBarHeight, selectionBarWidth, selectionBarColor

Additional customization

If you want to customize it even more, you can go right to the the SwipeViewController class file but be careful.

Author

fortmarek, [email protected]

License

SwipeViewController is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].