All Projects → shabib87 → Shviewpager

shabib87 / Shviewpager

Licence: mit
A simple view pager for iOS. Compatible with iOS 8.0 or later.

Programming Languages

swift
15916 projects
swift3
66 projects

Projects that are alternatives of or similar to Shviewpager

Walk-Through-Screen
This library provides easy ways to add onboarding or pager screens with different animation and indicators.
Stars: ✭ 31 (-75.59%)
Mutual labels:  viewpager, pager
Cmpagetitleview
✍️一分钟集成类似抖音,新浪微博,腾讯视频,网易新闻,今日头条等常见的标题栏样式,api灵活易扩展,支持Cocoapods和Masonry布局,支持ChildController的完整生命周期
Stars: ✭ 270 (+112.6%)
Mutual labels:  viewpager, pager
Reside-Menu
By applying viewpager animation you can also make AMAZING Reside Menu's
Stars: ✭ 72 (-43.31%)
Mutual labels:  viewpager, pager
Liquidswipe
Android LiquidSwipe Library
Stars: ✭ 721 (+467.72%)
Mutual labels:  viewpager, pager
Transformerslayout
🔥 App金刚区导航菜单,类似淘宝、QQ音乐等APP导航,方格布局横向多行滑动翻页带滚动条
Stars: ✭ 258 (+103.15%)
Mutual labels:  viewpager, pager
Concentriconboarding
Android Concentric Onboarding library
Stars: ✭ 42 (-66.93%)
Mutual labels:  viewpager, pager
Tsl Sdr
Software Defined Radio Demodulation and Decoding Tools
Stars: ✭ 94 (-25.98%)
Mutual labels:  pager
Whatsappviewpager
Swipeable tabs like WhatsApp in Android
Stars: ✭ 115 (-9.45%)
Mutual labels:  viewpager
Bannerlayout
Support unlimited picture rotation BannerLayout, the minimum implementation of the code banner
Stars: ✭ 92 (-27.56%)
Mutual labels:  viewpager
Androidanimationexercise
Android 动画各种实现,包括帧动画、补间动画和属性动画的总结分享
Stars: ✭ 1,254 (+887.4%)
Mutual labels:  viewpager
Xbanner
🔥【图片轮播】支持图片无限轮播,支持AndroidX、自定义指示点、显示提示文字、切换动画、自定义布局,一屏显示多个等功能
Stars: ✭ 1,734 (+1265.35%)
Mutual labels:  viewpager
Pageboy
📖 A simple, highly informative page view controller
Stars: ✭ 1,652 (+1200.79%)
Mutual labels:  viewpager
Loopviewpagerlayout
☺无限轮播ViewPagerLayout 广告栏 banner 多种滑动的样式 使用API简单明了
Stars: ✭ 100 (-21.26%)
Mutual labels:  viewpager
Bottomnavigation
A sample app for Bottom Navigation View with ViewPager in Android
Stars: ✭ 94 (-25.98%)
Mutual labels:  viewpager
Tycyclepagerview
a simple and usefull cycle pager view ,and auto scroll banner view(轮播图) ,include pageControl for iOS,support Objective-C and swift
Stars: ✭ 1,548 (+1118.9%)
Mutual labels:  pager
Viewpagerindicator
A Simple View Pager Indicator with animations
Stars: ✭ 94 (-25.98%)
Mutual labels:  viewpager
Zjywidget
🎨 一组实用炫酷自定义View的集合(包括源码及demo)包括常见的支付、扫描、解锁动画、炫酷转盘式菜单等效果。A collection of Android cool custom views
Stars: ✭ 121 (-4.72%)
Mutual labels:  viewpager
Parallaxscrollingview
Parallax scrolling either by offset or automatically.
Stars: ✭ 91 (-28.35%)
Mutual labels:  viewpager
Rvpindicator
ViewPager指示器 实现联动,自身滚动,支持类型 : 下滑线,三角形,全背景,图片
Stars: ✭ 99 (-22.05%)
Mutual labels:  viewpager
Pspg
Unix pager (with very rich functionality) designed for work with tables. Designed for PostgreSQL, but MySQL is supported too. Works well with pgcli too. Can be used as CSV or TSV viewer too. It supports searching, selecting rows, columns, or block and export selected area to clipboard.
Stars: ✭ 1,749 (+1277.17%)
Mutual labels:  pager

SHViewPager

SHViewPager

Version License Platform

  • A simple view pager for iOS, which acts similar to android's viewPager. Compatible with iOS 8.0 or later. Supports iPhones and iPads in all interface orientation.

Table of contents

Preview

iPhone interface:

iPhone screen

iPad interface:

iPad screen

Advantages

  • [x] Supports both Swift (v2.2 and v3.0) and Objective-C
  • [x] Supports all orientations
  • [x] Supports iPad
  • [x] Supports Autolayout

Demo project

Fully workable examples; both in Objective-C and Swift; are included. If you want to try it yourself, just download/checkout this repository, and run pod install from the Example directory first. Then open the SHViewPager.xcworkspace with Xcode.

Requirements

  • Xcode 6+
  • iOS 8+
  • ARC

Installation

###Cocoapods

Recommended way

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

use_frameworks!
target '<YourTarget>' do
	pod 'SHViewPager', '~> 2.0'
end

###Source files

  1. Download the latest code version or add the repository as a git submodule to your git-tracked project.
  2. Drag and drop the Classes and the Resources directory from the archive in your project navigator. Make sure to select Copy items when asked if you extracted the code archive outside of your project.

Use SHViewPager wherever you need it with #import <SHViewPager/SHViewPagerModule.h> in Objective-C and import SHViewPager in Swift.

##How to use

The SHViewPager needs it's datasource and delegate protocols to be implemented. Simply initialize it from code or better:

Method 1

  1. Drag and drop an UIView from the Storyboard to your UIViewController.
  2. Change the class to SHViewPager, and
  3. Finally connect the datasource, delegate and your property IBOutlet.

Method 2

  1. Drag and drop an UIViewController to the Storyboard.
  2. Change the class to SHViewPagerController

Four datasource methods are required and others are optional.

Objective-C: The required datasource methods are

- (NSInteger)numberOfPagesInViewPager:(SHViewPager *)viewPager;
- (UIViewController *)containerControllerForViewPager:(SHViewPager *)viewPager;
- (UIViewController *)viewPager:(SHViewPager *)viewPager controllerForPageAtIndex:(NSInteger)index;

and,

- (NSString *)viewPager:(SHViewPager *)viewPager titleForPageMenuAtIndex:(NSInteger)index;

or,

- (UIImage *)viewPager:(SHViewPager *)viewPager imageForPageMenuAtIndex:(NSInteger)index;

Swift: The required datasource methods are

func numberOfPages(in viewPager: SHViewPager) -> Int
func containerController(for viewPager: SHViewPager) -> UIViewController
func viewPager(_ viewPager: SHViewPager, controllerForPageAt index: Int) -> UIViewController

and,

func viewPager(_ viewPager: SHViewPager, titleForPageMenuAt index: Int) -> String

or,

func viewPager(_ viewPager: SHViewPager, imageForPageMenuAt index: Int) -> UIImage

To display the contents, you need to call the instance method reloadData in your desired method block; typically in viewDidLoad; and pagerWillLayoutSubviews in viewWillLayoutSubviews.

-Example:

Objective-C

- (void)viewDidLoad {
    [super viewDidLoad];
    // your code
    [viewPager reloadData];
}

-(void)viewWillLayoutSubviews {
    [super viewWillLayoutSubviews];
    [_pager pagerWillLayoutSubviews];
}

Swift

override func viewDidLoad() {
    super.viewDidLoad()
    // your code
    pager.reloadData()
}

override func viewWillLayoutSubviews() {
    super.viewWillLayoutSubviews()
    pager.pagerWillLayoutSubviews()
}

Known Issues

Please refer to the open issue list.

Author

Created by Ahmad Shabibul Hossain, @shabib_hossain on 5/15/14.

Contact

Share feedbacks and ideas to improve this project, I would love to hear them out. You can also follow me on @shabib_hossain.

License

SHViewPager 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].