Changelog History
Page 3
-
v1.1.0 Changes
March 25, 2018 -
v1.0.3 Changes
March 01, 2018- ๐ Fix issue where size delegate was not called #135
-
v1.0.2 Changes
February 22, 2018- โก๏ธ Update default background color for menu items #131
-
v1.0.1 Changes
February 03, 2018 -
v1.0.0 Changes
January 29, 2018๐ This release introduces a lot of breaking changes, a bunch of new features and a couple of bug fixes. Here are the most notable changes, with a full list of changes below.
โ Removed
PagingOptions
initializer #98๐ง All configuration is now moved into properties on the
PagingViewController
class. You no longer have to initialize aPagingViewController
with an instance conforming to thePagingOptions
protocol. This reduces the boilerplate of having to create a separate options struct when you just need to override a single value. It also means you can change the options after thePagingViewController
has been initialized. All the properties on thePagingTheme
protocol has also moved into separate properties onPagingViewController
.Before:
struct Theme: PagingTheme { let textColor: UIColor = .red } struct Options: PagingOptions { let theme: PagingTheme = Theme() let menuItemSize: PagingMenuItemSize = .fixed(width: 100, height: 40) } let pagingViewController = PagingViewController(options: Options())
After:
let pagingViewController = PagingViewController() pagingViewController.menuItemSize = .fixed(width: 100, height: 40) pagingViewController.textColor = .red
๐ Renamed data source #99
๐ The current data source protocol has been renamed to
PagingViewControllerInfiniteDataSource
and moved into the property calledinfiniteDataSource
.โ Added new data source #99
๐ A new
PagingViewControllerDataSource
protocol has been added that makes it easier to set up a custom data source if you have a fixed number of view controllers. To use the new data source, you only need to return the total number of view controllers as well as the view controller andPagingItem
for a given index. The new data source replaces the existingdataSource
property.Example:
extension ViewController: PagingViewControllerDataSource { func numberOfViewControllers<T>(in: PagingViewController<T>) -> Int { return items.count } func pagingViewController<T>(_ pagingViewController: PagingViewController<T>, viewControllerForIndex index: Int) -> UIViewController { return ItemViewController(item: items[index]) } func pagingViewController<T>(_ pagingViewController: PagingViewController<T>, pagingItemForIndex index: Int) -> T { return items[index] as! T } } ... pagingViewController.dataSource = self
โก๏ธ Updated delegate protocol #100
Three new delegate methods have been added to the
PagingViewControllerDelegate
protocol. You can now be notified before, during and after the user navigates to another view controller:protocol PagingViewControllerDelegate: class { func pagingViewController<T>( _ pagingViewController: PagingViewController<T>, isScrollingFromItem currentPagingItem: T, toItem upcomingPagingItem: T?, startingViewController: UIViewController, destinationViewController: UIViewController?, progress: CGFloat) func pagingViewController<T>( _ pagingViewController: PagingViewController<T>, willScrollToItem pagingItem: T, startingViewController: UIViewController, destinationViewController: UIViewController) func pagingViewController<T>( _ pagingViewController: PagingViewController<T>, didScrollToItem pagingItem: T, startingViewController: UIViewController?, destinationViewController: UIViewController, transitionSuccessful: Bool) func pagingViewController<T>( _ pagingViewController: PagingViewController<T>, widthForPagingItem pagingItem: T, isSelected: Bool) -> CGFloat? }
๐ The
widthForPagingItem:
delegate has been changed to returnCGFloat?
instead ofCGFloat
(See: #100). The default implementation will return nil.โ Removed
FixedPagingViewControllerDelegate
protocol #100๐ The
FixedPagingViewControllerDelegate
protocol is replaced by thePagingViewControllerDelegate
protocol. The new delegate does not include the index for the paging items, but you can get the current index from thePagingIndexItem
like this:extension ViewController: PagingViewControllerDelegate { func pagingViewController<T>(_ pagingViewController: PagingViewController<T>, didScrollToItem pagingItem: T, startingViewController: UIViewController?, destinationViewController: UIViewController, transitionSuccessful: Bool) { if let indexItem = pagingItem as? PagingIndexItem { print("index: ", indexItem.index) } } }
โ Added
- โ Add option to always center selected menu item #101
- ๐ Allow subclassing the collection view layout #104
- โ Add empty implementations of collection view delegate methods (4840483)
- โ Add option to disable content interaction #113
- โ Add option for selected background color #114
- โ Add method for selecting paging items based on index #117
๐ Changed
- ๐ Rename selectPagingItem to select(pagingItem:) #105
- ๐ Make PagingState property public #107
- ๐ Make PagingItems struct public #108
- ๐ Make PagingState extension properties public (f842a7b)
- ๐ Make indicator layout attributes open to allow subclassing (7c35acc)
- ๐ Change collection view delegate methods to open (68b125b)
- Replace PagingTheme with PagingOptions #111
- ๐ Rename
headerBackgroundColor
tomenuBackgroundColor
#116
๐ Fixes
- ๐ Fix performance issue with updating content offset #106
- Set background color for paging cell based on options (1a70bd6)
- ๐ Fix layout calculation when using transforms #102
- Account for menu spacing when generating items #103
- ๐ Fix bug with animation when selecting items (73913f)
-
v0.9.0 Changes
December 25, 2017โ Added
- โ Add method for reloading data #94
- ๐ Allow setting different width for selected cell #85
-
v0.8.0 Changes
November 19, 2017๐ Fixes
- ๐ Fix selecting paging items before view appears #79
- ๐ Fix issues with safe area insets #81
-
v0.7.0 Changes
November 07, 2017๐ Changes
- ๐ Change access for EMPageViewController delegate method #72
- ๐ Improve performance by using manual frames for menu cells #68
- โ Add option to customize indicator and border view #67
- ๐ Update documentation #60
-
v0.6.0 Changes
September 25, 2017๐ Changes
- โฌ๏ธ Upgrade to Swift 4.0 #54
๐ Fixes
- ๐ Fix bug where selecting items was not working #55
-
v0.5.0 Changes
August 22, 2017