The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
- Update Swift version to 5.10 #705
- Set minimum deployment target to iOS 12 #699
- Add privacy manifest file #695
- Update Swift version to 5.9 #700
**Version 4.0** introduced a new and improved API for PageView in SwiftUI. Each page can now show define their own menu items, which can be any SwiftUI view. The new API also supports result builders, which allows you to easily setup your PageView. See more in the [README](https://github.com/rechsteiner/Parchment/tree/4.0).
```swift
PageView {
Page("Title 1") {
Text("Page 1")
}
Page { _ in
Image(systemName: "star.fill")
} content: {
Text("Page 2")
}
}
```
## Changes
- New API for PageView in SwiftUI #666
- Updated minimum deployment target to iOS 11 #661
## Added
- Add horizontal right alignment support #658
### Fixes
- Fix issue with unsafe flags when using SwiftPM #662
### Fixes
- Fix issue with menu insets not updating #619
- Update content size after parent size #623
- Fix SPM linker settings #622 #615
- Update Pods file to support iOS >= 9 #620
### Added
* Add support for `pagingContentBackgroundColor` property #592
* Add `contentInteraction` property into `PagingOptions` #593
### Changes
* Support for Xcode 13 #581 #601
* Updated API for SwiftUI wrapper #572 #551
* Drop support for iOS 8 #568
* Remove support for older Swift versions #595
* Improve accessibility of default paging cell #602
### Fixes
* Remove Carthage reference in FRAMEWORK_SEARCH_PATH #569
* Fix wrong page direction when current paging item is out of view #567
* Fix issue with rotation when using SwiftUI wrapper #596
* Fix layout issue in PageViewController #543
* Fix crash when using UIColor(patternImage:) #544
Changes:
- Custom PageViewController (#468)
- RTL language support (#468)
This version introduces some breaking changes:
## Replaced `EMPageViewController`
`EMPageViewController` has been replaced with our own `PageViewController` implementation, which fixes a bunch of issues (#524, #527, #426). The API of the new page view controller is pretty much identical to the old one, but the names of the types have changed:
```diff
open class PagingViewController:
UIViewController,
UICollectionViewDelegate,
- EMPageViewControllerDataSource,
- EMPageViewControllerDelegate {
+ PageViewControllerDataSource,
+ PageViewControllerDelegate {
- public let pageViewController: EMPageViewController
+ public let pageViewController: PageViewController
- open func em_pageViewController(_ pageViewController: EMPageViewController, viewControllerBeforeViewController viewController: UIViewController) -> UIViewController? {
+ open func pageViewController(_ pageViewController: PageViewController, viewControllerBeforeViewController viewController: UIViewController) -> UIViewController? {
- open func em_pageViewController(_ pageViewController: EMPageViewController, viewControllerAfterViewController viewController: UIViewController) -> UIViewController? {
+ open func pageViewController(_ pageViewController: PageViewController, viewControllerAfterViewController viewController: UIViewController) -> UIViewController? {
- open func em_pageViewController(_ pageViewController: EMPageViewController, isScrollingFrom startingViewController: UIViewController, destinationViewController: UIViewController?, progress: CGFloat) {
+ public func pageViewController(_ pageViewController: PageViewController, isScrollingFrom startingViewController: UIViewController, destinationViewController: UIViewController?, progress: CGFloat) {
- open func em_pageViewController(_ pageViewController: EMPageViewController, willStartScrollingFrom startingViewController: UIViewController, destinationViewController: UIViewController) {
+ public func pageViewController(_ pageViewController: PageViewController, willStartScrollingFrom startingViewController: UIViewController, destinationViewController: UIViewController) {
- open func em_pageViewController(_ pageViewController: EMPageViewController, didFinishScrollingFrom startingViewController: UIViewController?, destinationViewController: UIViewController, transitionSuccessful: Bool) {
+ open func pageViewController(_ pageViewController: PageViewController, didFinishScrollingFrom startingViewController: UIViewController, destinationViewController: UIViewController, transitionSuccessful: Bool) {
}
```
More details about the release can be found here: #452
Fixed an issue building due to missing imports #526
This is pre-release for version 3.0. See #452 for more details on changes.