FSPagerView alternatives and similar libraries
Based on the "UI" category.
Alternatively, view FSPagerView alternatives based on common mentions on social networks and blogs.
-
Lottie
An iOS library to natively render After Effects vector animations -
AsyncDisplayKit
Smooth asynchronous user interfaces for iOS apps. -
DZNEmptyDataSet
A drop-in UITableView/UICollectionView superclass category for showing empty datasets whenever the view has no content to display -
IQKeyboardManager
Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView. Neither need to write any code nor any setup required and much more. -
IGListKit
A data-driven UICollectionView framework for building fast and flexible lists. -
iCarousel
A simple, highly customisable, data-driven 3D carousel for iOS and Mac OS -
SVProgressHUD
A clean and lightweight progress HUD for your iOS and tvOS app. -
TTTAttributedLabel
A drop-in replacement for UILabel that supports attributes, data detectors, links, and more -
FSCalendar
A fully customizable iOS calendar library, compatible with Objective-C and Swift -
animated-tab-bar
:octocat: RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion -
folding-cell
:octocat: 📃 FoldingCell is an expanding content cell with animation made by @Ramotion -
NVActivityIndicatorView
A collection of awesome loading animations -
SkeletonView
☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting -
LTMorphingLabel
[EXPERIMENTAL] Graceful morphing effects for UILabel written in Swift. -
MGSwipeTableCell
An easy to use UITableViewCell subclass that allows to display swippable buttons with a variety of transitions. -
SWTableViewCell
An easy-to-use UITableViewCell subclass that implements a swippable content view which exposes utility buttons (similar to iOS 7 Mail Application) -
SwiftMessages
A very flexible message bar for iOS written in Swift. -
ViewAnimator
ViewAnimator brings your UI to life with just one line -
JTAppleCalendar
The Unofficial Apple iOS Swift Calendar View. Swift calendar Library. iOS calendar Control. 100% Customizable -
XLForm
XLForm is the most flexible and powerful iOS library to create dynamic table-view forms. Fully compatible with Swift & Obj-C. -
JVFloatLabeledTextField
UITextField subclass with floating labels - inspired by Matt D. Smith's design: http://dribbble.com/shots/1254439--GIF-Mobile-Form-Interaction?list=users -
TPKeyboardAvoiding
A drop-in universal solution for moving text fields out of the way of the keyboard in iOS -
SVPullToRefresh
Give pull-to-refresh & infinite scrolling to any UIScrollView with 1 line of code. -
Alerts & Pickers
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date... -
AMScrollingNavbar
Scrollable UINavigationBar that follows the scrolling of a UIScrollView -
Koloda
KolodaView is a class designed to simplify the implementation of Tinder like cards on iOS. -
SwipeCellKit
Swipeable UITableViewCell/UICollectionViewCell based on the stock Mail.app, implemented in Swift. -
SwiftEntryKit
SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps. -
SCLAlertView-Swift
Beautiful animated Alert View. Written in Swift -
Macaw
Powerful and easy-to-use vector graphics Swift library with SVG support -
PageMenu
A paging menu controller built from other view controllers placed inside a scroll view (like Spotify, Windows Phone, Instagram) -
TextFieldEffects
Custom UITextFields effects inspired by Codrops, built using Swift -
ViewDeck
An implementation of the sliding menu found in various iOS apps. -
Material Components
[In maintenance mode] Modular and customizable Material Design UI components for iOS -
SideMenu
Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less. -
SWRevealViewController
A UIViewController subclass for presenting side view controllers inspired on the FaceBook and Wunderlist apps, done right ! -
expanding-collection
:octocat: ExpandingCollection is an animated material design UI card peek/pop controller. iOS library made by @Ramotion -
CSStickyHeaderFlowLayout
UICollectionView replacement of UITableView. Do even more like Parallax Header, Sticky Section Header. Made for iOS 7. -
TSMessages
💌 Easy to use and customizable messages/notifications for iOS à la Tweetbot
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of FSPagerView or a related project?
README
SWIFT | OBJECTIVE-C |
---|
FSPagerView is an elegant Screen Slide Library implemented primarily with UICollectionView. It is extremely helpful for making Banner、Product Show、Welcome/Guide Pages、Screen/ViewController Sliders.
Features
- Infinite scrolling.
- Automatic Sliding.
- Horizontal and Vertical paging.
- Fully customizable item, with predefined banner-style item.
- Fully customizable page control.
- Rich build-in 3D transformers.
- Simple and Delightful api usage.
- Support SWIFT and OBJECTIVE-C.
Demos
Demo1 - Banner
Banner |
---|
![]() |
automaticSlidingInterval
The time interval of automatic sliding. 0 means disabling automatic sliding. Default is 0.
e.g.
pagerView.automaticSlidingInterval = 3.0
isInfinite
A boolean value indicates whether the pager view has infinite number of items. Default is false.
e.g.
pagerView.isInfinite = true
decelerationDistance
An unsigned integer value that determines the paging distance of the pager view, which indicates the number of passing items during the deceleration. When the value of this property is FSPagerView.automaticDistance, the actual 'distance' is automatically calculated according to the scrolling speed of the pager view. Default is 1.
e.g.
pagerView.decelerationDistance = 2
itemSize
The item size of the pager view. When the value of this property is FSPagerView.automaticSize, the items fill the entire visible area of the pager view. Default is FSPagerView.automaticSize.
e.g.
pagerView.itemSize = CGSize(width: 200, height: 180)
interitemSpacing
The spacing to use between items in the pager view. Default is 0.
e.g.
pagerView.interitemSpacing = 10
Demo2 - Transformers
Cross Fading |
---|
![]() |
pagerView.transformer = FSPagerViewTransformer(type: .crossFading)
Zoom Out |
---|
![]() |
pagerView.transformer = FSPagerViewTransformer(type: .zoomOut)
Depth |
---|
![]() |
pagerView.transformer = FSPagerViewTransformer(type: .depth)
Linear |
---|
![]() |
pagerView.transformer = FSPagerViewTransformer(type: .linear)
Overlap |
---|
![]() |
pagerView.transformer = FSPagerViewTransformer(type: .overlap)
Ferris Wheel |
---|
![]() |
pagerView.transformer = FSPagerViewTransformer(type: .ferrisWheel)
Inverted Ferris Wheel |
---|
![]() |
pagerView.transformer = FSPagerViewTransformer(type: .invertedFerrisWheel)
Cover Flow |
---|
![]() |
pagerView.transformer = FSPagerViewTransformer(type: .coverFlow)
Cubic |
---|
![]() |
pagerView.transformer = FSPagerViewTransformer(type: .cubic)
Customize your own transformer by subclassing
FSPagerViewTransformer.
Demo3 Page Control
Page Control |
---|
![]() |
numberOfPages
The number of page indicators of the page control. Default is 0.
e.g.
pageControl.numberOfPages = 5
currentPage
The current page, highlighted by the page control. Default is 0.
e.g.
pageControl.currentPage = 1
contentHorizontalAlignment
The horizontal alignment of content within the control’s bounds. Default is center.
e.g.
pageControl.contentHorizontalAlignment = .right
setStrokeColor:forState:
Sets the stroke color for page indicators to use for the specified state. (selected/normal).
e.g.
pageControl.setStrokeColor(.green, for: .normal)
pageControl.setStrokeColor(.yellow, for: .selected)
setFillColor:forState:
Sets the fill color for page indicators to use for the specified state. (selected/normal).
e.g.
pageControl.setFillColor(.gray, for: .normal)
pageControl.setFillColor(.white, for: .selected)
setImage:forState:
Sets the image for page indicators to use for the specified state. (selected/normal).
e.g.
pageControl.setImage(UIImage(named:"image1"), for: .normal)
pageControl.setImage(UIImage(named:"image2"), for: .selected)
setPath:forState:
Sets the path for page indicators to use for the specified state. (selected/normal).
e.g.
pageControl.setPath(UIBezierPath(rect: CGRect(x: 0, y: 0, width: 8, height: 8)), for: .normal)
pageControl.setPath(UIBezierPath(ovalIn: CGRect(x: 0, y: 0, width: 8, height: 8)), for: .selected)
Installation
- Manually
- Cocoapods
- Carthage
Manually
- [Download](#) the source code.
- Extract the zip file, simply drag folder Sources into your project.
- Make sure Copy items if needed is checked.
Cocoapods
use_frameworks!
target '<Your Target Name>' do
pod 'FSPagerView'
end
Carthage
github "WenchaoD/FSPagerView"
Tutorial
1. Getting started
- Getting started with code
// Create a pager view
let pagerView = FSPagerView(frame: frame1)
pagerView.dataSource = self
pagerView.delegate = self
pagerView.register(FSPagerViewCell.self, forCellWithReuseIdentifier: "cell")
self.view.addSubview(pagerView)
// Create a page control
let pageControl = FSPageControl(frame: frame2)
self.view.addSubview(pageControl)
- Getting started with Interface Builder
1、Simply drag UIView instance into your View Controller, Change the
Custom Class
toFSPagerView
. (OrFSPageControl
) 2、Link thedataSource
anddelegate
property of FSPagerView to your View Controller. 3、Register a cell class.
@IBOutlet weak var pagerView: FSPagerView! {
didSet {
self.pagerView.register(FSPagerViewCell.self, forCellWithReuseIdentifier: "cell")
}
}
2. Implement FSPagerViewDataSource
public func numberOfItems(in pagerView: FSPagerView) -> Int {
return numberOfItems
}
public func pagerView(_ pagerView: FSPagerView, cellForItemAt index: Int) -> FSPagerViewCell {
let cell = pagerView.dequeueReusableCell(withReuseIdentifier: "cell", at: index)
cell.imageView?.image = ...
cell.textLabel?.text = ...
return cell
}
3. Implement FSPagerViewDelegate
func pagerView(_ pagerView: FSPagerView, shouldHighlightItemAt index: Int) -> Bool
Asks the delegate if the item should be highlighted during tracking.
func pagerView(_ pagerView: FSPagerView, didHighlightItemAt index: Int)
Tells the delegate that the item at the specified index was highlighted.
func pagerView(_ pagerView: FSPagerView, shouldSelectItemAt index: Int) -> Bool
Asks the delegate if the specified item should be selected.
func pagerView(_ pagerView: FSPagerView, didSelectItemAt index: Int)
Tells the delegate that the item at the specified index was selected.
func pagerView(_ pagerView: FSPagerView, willDisplay cell: FSPagerViewCell, forItemAt index: Int)
Tells the delegate that the specified cell is about to be displayed in the pager view.
func pagerView(_ pagerView: FSPagerView, didEndDisplaying cell: FSPagerViewCell, forItemAt index: Int)
Tells the delegate that the specified cell was removed from the pager view.
func pagerViewWillBeginDragging(_ pagerView: FSPagerView)
Tells the delegate when the pager view is about to start scrolling the content.
func pagerViewWillEndDragging(_ pagerView: FSPagerView, targetIndex: Int)
Tells the delegate when the user finishes scrolling the content.
func pagerViewDidScroll(_ pagerView: FSPagerView)
Tells the delegate when the user scrolls the content view within the receiver.
func pagerViewDidEndScrollAnimation(_ pagerView: FSPagerView)
Tells the delegate when a scrolling animation in the pager view concludes.
func pagerViewDidEndDecelerating(_ pagerView: FSPagerView)
Tells the delegate that the pager view has ended decelerating the scrolling movement.
Support this repo
Star this repo
Buy me a Coffee. ☕️
| |