diff --git a/.swift-version b/.swift-version index 9f55b2c..819e07a 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -3.0 +5.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index b862039..1020ef2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +# 0.2.9 Release notes (2019-10-10) + +## Enhancements + +Updated Swift Version from 4.2 to 5, and Deployment Target form 10.3 to 11.0. +Supported Safe Area Guide. + +# 0.2.8 Release notes (2018-09-11) + +## Enhancements + +* Fixed Swift 4.2 warnings and updated deployment target to 10.3. + # 0.2.7 Release notes (2017-04-13) ## Enhancements diff --git a/Demo/TabPageViewControllerDemo/AppDelegate.swift b/Demo/TabPageViewControllerDemo/AppDelegate.swift index 56e1333..b525496 100644 --- a/Demo/TabPageViewControllerDemo/AppDelegate.swift +++ b/Demo/TabPageViewControllerDemo/AppDelegate.swift @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } diff --git a/Demo/TabPageViewControllerDemo/Base.lproj/Main.storyboard b/Demo/TabPageViewControllerDemo/Base.lproj/Main.storyboard index 77473f6..fc99dd5 100644 --- a/Demo/TabPageViewControllerDemo/Base.lproj/Main.storyboard +++ b/Demo/TabPageViewControllerDemo/Base.lproj/Main.storyboard @@ -1,11 +1,10 @@ - - - - + + - + + @@ -13,10 +12,6 @@ - - - - @@ -42,9 +37,10 @@ - + + @@ -78,12 +74,13 @@ + - + diff --git a/Demo/TabPageViewControllerDemo/ListViewController.swift b/Demo/TabPageViewControllerDemo/ListViewController.swift index dc0738f..8e36565 100644 --- a/Demo/TabPageViewControllerDemo/ListViewController.swift +++ b/Demo/TabPageViewControllerDemo/ListViewController.swift @@ -10,17 +10,14 @@ import UIKit import TabPageViewController class ListViewController: UITableViewController { - - override func viewDidLayoutSubviews() { - super.viewDidLayoutSubviews() - - let navigationHeight = topLayoutGuide.length - tableView.contentInset.top = navigationHeight + TabPageOption().tabHeight + + override func viewDidLoad() { + super.viewDidLoad() + tableView.contentInset.top = TabPageOption().tabHeight } fileprivate func updateNavigationBarOrigin(velocity: CGPoint) { guard let tabPageViewController = parent as? TabPageViewController else { return } - if velocity.y > 0.5 { tabPageViewController.updateNavigationBarHidden(true, animated: true) } else if velocity.y < -0.5 { diff --git a/README.md b/README.md index 9fbaeaa..ebe7299 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ tabPageViewController.isInfinity = true ## Requirements -iOS8+ +iOS11.0+ ## Installation @@ -128,7 +128,7 @@ Copy all the files in `Pod/Classes` directory into your project. ## Author -EndouMari, endo@vasily.jp +EndouMari ## License diff --git a/Sources/TabCollectionCell.swift b/Sources/TabCollectionCell.swift index cc9a02d..6c869e9 100644 --- a/Sources/TabCollectionCell.swift +++ b/Sources/TabCollectionCell.swift @@ -10,7 +10,7 @@ import UIKit class TabCollectionCell: UICollectionViewCell { - var tabItemButtonPressedBlock: ((Void) -> Void)? + var tabItemButtonPressedBlock: (() -> Void)? var option: TabPageOption = TabPageOption() { didSet { currentBarViewHeightConstraint.constant = option.currentBarHeight @@ -47,7 +47,7 @@ class TabCollectionCell: UICollectionViewCell { } override func sizeThatFits(_ size: CGSize) -> CGSize { - if item.characters.count == 0 { + if item.count == 0 { return CGSize.zero } diff --git a/Sources/TabPageViewController.swift b/Sources/TabPageViewController.swift index 72f6c89..b8bd0a8 100644 --- a/Sources/TabPageViewController.swift +++ b/Sources/TabPageViewController.swift @@ -17,7 +17,7 @@ open class TabPageViewController: UIPageViewController { guard let viewController = viewControllers?.first else { return nil } - return tabItems.map{ $0.viewController }.index(of: viewController) + return tabItems.map{ $0.viewController }.firstIndex(of: viewController) } fileprivate var beforeIndex: Int = 0 fileprivate var tabItemsCount: Int { @@ -78,9 +78,9 @@ open class TabPageViewController: UIPageViewController { // MARK: - Public Interface -public extension TabPageViewController { +extension TabPageViewController { - public func displayControllerWithIndex(_ index: Int, direction: UIPageViewControllerNavigationDirection, animated: Bool) { + public func displayControllerWithIndex(_ index: Int, direction: UIPageViewController.NavigationDirection, animated: Bool) { beforeIndex = index shouldScrollCurrentBar = false @@ -110,7 +110,7 @@ extension TabPageViewController { fileprivate func setupPageViewController() { dataSource = self delegate = self - automaticallyAdjustsScrollViewInsets = false + //automaticallyAdjustsScrollViewInsets = false setViewControllers([tabItems[beforeIndex].viewController], direction: .forward, @@ -120,7 +120,8 @@ extension TabPageViewController { fileprivate func setupScrollView() { // Disable PageViewController's ScrollView bounce - let scrollView = view.subviews.flatMap { $0 as? UIScrollView }.first + let scrollView = view.subviews.compactMap { $0 as? UIScrollView }.first + scrollView?.contentInsetAdjustmentBehavior = .never scrollView?.scrollsToTop = false scrollView?.delegate = self scrollView?.backgroundColor = option.pageBackgoundColor @@ -141,52 +142,22 @@ extension TabPageViewController { fileprivate func configuredTabView() -> TabView { let tabView = TabView(isInfinity: isInfinity, option: option) tabView.translatesAutoresizingMaskIntoConstraints = false - - let height = NSLayoutConstraint(item: tabView, - attribute: .height, - relatedBy: .equal, - toItem: nil, - attribute: .height, - multiplier: 1.0, - constant: option.tabHeight) - tabView.addConstraint(height) view.addSubview(tabView) - - let top = NSLayoutConstraint(item: tabView, - attribute: .top, - relatedBy: .equal, - toItem: topLayoutGuide, - attribute: .bottom, - multiplier:1.0, - constant: 0.0) - - let left = NSLayoutConstraint(item: tabView, - attribute: .leading, - relatedBy: .equal, - toItem: view, - attribute: .leading, - multiplier: 1.0, - constant: 0.0) - - let right = NSLayoutConstraint(item: view, - attribute: .trailing, - relatedBy: .equal, - toItem: tabView, - attribute: .trailing, - multiplier: 1.0, - constant: 0.0) - - view.addConstraints([top, left, right]) + + let guide = view.safeAreaLayoutGuide + tabView.heightAnchor.constraint(equalToConstant: option.tabHeight).isActive = true + tabBarTopConstraint = tabView.topAnchor.constraint(equalTo: guide.topAnchor) + tabBarTopConstraint!.isActive = true + tabView.leadingAnchor.constraint(equalTo: guide.leadingAnchor).isActive = true + tabView.trailingAnchor.constraint(equalTo: guide.trailingAnchor).isActive = true tabView.pageTabItems = tabItems.map({ $0.title}) tabView.updateCurrentIndex(beforeIndex, shouldScroll: true) - tabView.pageItemPressedBlock = { [weak self] (index: Int, direction: UIPageViewControllerNavigationDirection) in + tabView.pageItemPressedBlock = { [weak self] (index: Int, direction: UIPageViewController.NavigationDirection) in self?.displayControllerWithIndex(index, direction: direction, animated: true) } - tabBarTopConstraint = top - return tabView } @@ -195,42 +166,13 @@ extension TabPageViewController { statusView.backgroundColor = option.tabBackgroundColor statusView.translatesAutoresizingMaskIntoConstraints = false view.addSubview(statusView) - - let top = NSLayoutConstraint(item: statusView, - attribute: .top, - relatedBy: .equal, - toItem: view, - attribute: .top, - multiplier:1.0, - constant: 0.0) - - let left = NSLayoutConstraint(item: statusView, - attribute: .leading, - relatedBy: .equal, - toItem: view, - attribute: .leading, - multiplier: 1.0, - constant: 0.0) - - let right = NSLayoutConstraint(item: view, - attribute: .trailing, - relatedBy: .equal, - toItem: statusView, - attribute: .trailing, - multiplier: 1.0, - constant: 0.0) - - let height = NSLayoutConstraint(item: statusView, - attribute: .height, - relatedBy: .equal, - toItem: nil, - attribute: .height, - multiplier: 1.0, - constant: topLayoutGuide.length) - - view.addConstraints([top, left, right, height]) - - statusViewHeightConstraint = height + + let guide = view.safeAreaLayoutGuide + statusView.topAnchor.constraint(equalTo: view.topAnchor).isActive = true + statusView.leadingAnchor.constraint(equalTo: guide.leadingAnchor).isActive = true + statusView.trailingAnchor.constraint(equalTo: guide.trailingAnchor).isActive = true + statusViewHeightConstraint = statusView.heightAnchor.constraint(equalToConstant: view.safeAreaInsets.top) + statusViewHeightConstraint!.isActive = true self.statusView = statusView } @@ -260,7 +202,7 @@ extension TabPageViewController { setupStatusView() } - statusViewHeightConstraint!.constant = topLayoutGuide.length + statusViewHeightConstraint!.constant = view.safeAreaInsets.top } public func showNavigationBar() { @@ -270,7 +212,7 @@ extension TabPageViewController { if option.hidesTopViewOnSwipeType != .none { tabBarTopConstraint.constant = 0.0 - UIView.animate(withDuration: TimeInterval(UINavigationControllerHideShowBarDuration)) { + UIView.animate(withDuration: TimeInterval(UINavigationController.hideShowBarDuration)) { self.view.layoutIfNeeded() } } @@ -281,9 +223,8 @@ extension TabPageViewController { private func updateTabBarOrigin(hidden: Bool) { guard let tabBarTopConstraint = tabBarTopConstraint else { return } - - tabBarTopConstraint.constant = hidden ? -(20.0 + option.tabHeight) : 0.0 - UIView.animate(withDuration: TimeInterval(UINavigationControllerHideShowBarDuration)) { + tabBarTopConstraint.constant = hidden ? -(UIApplication.shared.statusBarFrame.height + option.tabHeight) : 0.0 + UIView.animate(withDuration: TimeInterval(UINavigationController.hideShowBarDuration)) { self.view.layoutIfNeeded() } } @@ -296,7 +237,7 @@ extension TabPageViewController: UIPageViewControllerDataSource { fileprivate func nextViewController(_ viewController: UIViewController, isAfter: Bool) -> UIViewController? { - guard var index = tabItems.map({$0.viewController}).index(of: viewController) else { + guard var index = tabItems.map({$0.viewController}).firstIndex(of: viewController) else { return nil } diff --git a/Sources/TabView.swift b/Sources/TabView.swift index 0a870b7..4b5b649 100644 --- a/Sources/TabView.swift +++ b/Sources/TabView.swift @@ -10,7 +10,7 @@ import UIKit internal class TabView: UIView { - var pageItemPressedBlock: ((_ index: Int, _ direction: UIPageViewControllerNavigationDirection) -> Void)? + var pageItemPressedBlock: ((_ index: Int, _ direction: UIPageViewController.NavigationDirection) -> Void)? var pageTabItems: [String] = [] { didSet { pageTabItemsCount = pageTabItems.count @@ -46,46 +46,17 @@ internal class TabView: UIView { Bundle(for: TabView.self).loadNibNamed("TabView", owner: self, options: nil) addSubview(contentView) contentView.backgroundColor = option.tabBackgroundColor.withAlphaComponent(option.tabBarAlpha) - - let top = NSLayoutConstraint(item: contentView, - attribute: .top, - relatedBy: .equal, - toItem: self, - attribute: .top, - multiplier: 1.0, - constant: 0.0) - - let left = NSLayoutConstraint(item: contentView, - attribute: .leading, - relatedBy: .equal, - toItem: self, - attribute: .leading, - multiplier: 1.0, - constant: 0.0) - - let bottom = NSLayoutConstraint (item: self, - attribute: .bottom, - relatedBy: .equal, - toItem: contentView, - attribute: .bottom, - multiplier: 1.0, - constant: 0.0) - - let right = NSLayoutConstraint(item: self, - attribute: .trailing, - relatedBy: .equal, - toItem: contentView, - attribute: .trailing, - multiplier: 1.0, - constant: 0.0) - + + contentView.topAnchor.constraint(equalTo: topAnchor).isActive = true + contentView.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true + contentView.trailingAnchor.constraint(equalTo: trailingAnchor).isActive = true + contentView.bottomAnchor.constraint(equalTo: bottomAnchor).isActive = true contentView.translatesAutoresizingMaskIntoConstraints = false - self.addConstraints([top, left, bottom, right]) let bundle = Bundle(for: TabView.self) let nib = UINib(nibName: TabCollectionCell.cellIdentifier(), bundle: bundle) collectionView.register(nib, forCellWithReuseIdentifier: TabCollectionCell.cellIdentifier()) - cellForSize = nib.instantiate(withOwner: nil, options: nil).first as! TabCollectionCell + cellForSize = nib.instantiate(withOwner: nil, options: nil).first as? TabCollectionCell collectionView.scrollsToTop = false @@ -95,23 +66,11 @@ internal class TabView: UIView { currentBarView.removeFromSuperview() collectionView.addSubview(currentBarView) currentBarView.translatesAutoresizingMaskIntoConstraints = false - let top = NSLayoutConstraint(item: currentBarView, - attribute: .top, - relatedBy: .equal, - toItem: collectionView, - attribute: .top, - multiplier: 1.0, - constant: option.tabHeight - currentBarViewHeightConstraint.constant) - - let left = NSLayoutConstraint(item: currentBarView, - attribute: .leading, - relatedBy: .equal, - toItem: collectionView, - attribute: .leading, - multiplier: 1.0, - constant: 0.0) - currentBarViewLeftConstraint = left - collectionView.addConstraints([top, left]) + + currentBarView.topAnchor.constraint(equalTo: collectionView.topAnchor, constant: option.tabHeight - currentBarViewHeightConstraint.constant).isActive = true + currentBarViewLeftConstraint = currentBarView.leadingAnchor.constraint(equalTo: collectionView.leadingAnchor) + currentBarViewLeftConstraint!.isActive = true + } bottomBarViewHeightConstraint.constant = 1.0 / UIScreen.main.scale @@ -134,6 +93,7 @@ extension TabView { - parameter contentOffsetX: contentOffset.x of scrollView of isInfinityTabPageViewController */ func scrollCurrentBarView(_ index: Int, contentOffsetX: CGFloat) { + var nextIndex = isInfinity ? index + pageTabItemsCount : index if isInfinity && index == 0 && (beforeIndex - pageTabItemsCount) == pageTabItemsCount - 1 { // Calculate the index at the time of transition to the first item from the last item of pageTabItems @@ -161,7 +121,7 @@ extension TabView { let distance = (currentCell.frame.width / 2.0) + (nextCell.frame.width / 2.0) let scrollRate = contentOffsetX / frame.width - if fabs(scrollRate) > 0.6 { + if abs(scrollRate) > 0.6 { nextCell.highlightTitle() currentCell.unHighlightTitle() } else { @@ -169,7 +129,7 @@ extension TabView { currentCell.highlightTitle() } - let width = fabs(scrollRate) * (nextCell.frame.width - currentCell.frame.width) + let width = abs(scrollRate) * (nextCell.frame.width - currentCell.frame.width) if isInfinity { let scroll = scrollRate * distance collectionView.contentOffset.x = collectionViewContentOffsetX + scroll @@ -277,7 +237,7 @@ extension TabView { fileprivate func deselectVisibleCells() { collectionView .visibleCells - .flatMap { $0 as? TabCollectionCell } + .compactMap { $0 as? TabCollectionCell } .forEach { $0.isCurrent = false } } } @@ -303,7 +263,7 @@ extension TabView: UICollectionViewDataSource { cell.option = option cell.isCurrent = fixedIndex == (currentIndex % pageTabItemsCount) cell.tabItemButtonPressedBlock = { [weak self, weak cell] in - var direction: UIPageViewControllerNavigationDirection = .forward + var direction: UIPageViewController.NavigationDirection = .forward if let pageTabItemsCount = self?.pageTabItemsCount, let currentIndex = self?.currentIndex { if self?.isInfinity == true { if (indexPath.item < pageTabItemsCount) || (indexPath.item < currentIndex) { diff --git a/TabPageViewController.podspec b/TabPageViewController.podspec index 962b556..16a9084 100644 --- a/TabPageViewController.podspec +++ b/TabPageViewController.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = "TabPageViewController" - s.version = "0.2.7" + s.version = "0.2.9" s.summary = "Custom UIPageViewController" # This description is used to generate tags and improve search results. @@ -25,7 +25,7 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/EndouMari/TabPageViewController.git", :tag => s.version.to_s } # s.social_media_url = 'https://twitter.com/' - s.platform = :ios, '8.0' + s.platform = :ios, '11.0' s.requires_arc = true s.source_files = 'Sources/*.swift' diff --git a/TabPageViewController.xcodeproj/TabPageViewController_Info.plist b/TabPageViewController.xcodeproj/TabPageViewController_Info.plist index 6bcdeda..8594633 100644 --- a/TabPageViewController.xcodeproj/TabPageViewController_Info.plist +++ b/TabPageViewController.xcodeproj/TabPageViewController_Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.2.7 + 0.2.9 CFBundleSignature ???? CFBundleVersion diff --git a/TabPageViewController.xcodeproj/project.pbxproj b/TabPageViewController.xcodeproj/project.pbxproj index e15b023..d816b10 100644 --- a/TabPageViewController.xcodeproj/project.pbxproj +++ b/TabPageViewController.xcodeproj/project.pbxproj @@ -76,7 +76,7 @@ F8CE39F81F35AE6500CF74BA /* InfiniteTabPageViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = InfiniteTabPageViewController.swift; path = Demo/TabPageViewControllerDemo/InfiniteTabPageViewController.swift; sourceTree = ""; }; OBJ_12 /* TabPageViewControllerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabPageViewControllerTests.swift; sourceTree = ""; }; OBJ_14 /* TabPageViewController.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TabPageViewController.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - OBJ_15 /* TabPageViewControllerTests.xctest */ = {isa = PBXFileReference; lastKnownFileType = file; path = TabPageViewControllerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + OBJ_15 /* TabPageViewControllerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; path = TabPageViewControllerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; OBJ_9 /* TabPageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabPageViewController.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -266,12 +266,16 @@ TargetAttributes = { 4C2122CE1E6E8E9700572DBD = { CreatedOnToolsVersion = 8.2.1; - DevelopmentTeam = ZX4AV7HKD2; + LastSwiftMigration = 1110; ProvisioningStyle = Automatic; }; OBJ_16 = { + LastSwiftMigration = 1110; ProvisioningStyle = Automatic; }; + OBJ_23 = { + LastSwiftMigration = 1110; + }; }; }; buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "TabPageViewController" */; @@ -279,6 +283,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -406,7 +411,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - DEVELOPMENT_TEAM = ZX4AV7HKD2; + DEVELOPMENT_TEAM = ""; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; @@ -422,13 +427,12 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Demo/TabPageViewControllerDemo/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_BUNDLE_IDENTIFIER = jp.vasily.TabPageViewControllerDemo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -456,7 +460,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - DEVELOPMENT_TEAM = ZX4AV7HKD2; + DEVELOPMENT_TEAM = ""; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -468,13 +472,12 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Demo/TabPageViewControllerDemo/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = jp.vasily.TabPageViewControllerDemo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -491,13 +494,13 @@ ); HEADER_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = TabPageViewController.xcodeproj/TabPageViewController_Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; OTHER_LDFLAGS = "$(inherited)"; OTHER_SWIFT_FLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = TabPageViewController; PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SWIFT_VERSION = 5.0; TARGET_NAME = TabPageViewController; }; name = Debug; @@ -515,13 +518,13 @@ ); HEADER_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = TabPageViewController.xcodeproj/TabPageViewController_Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; OTHER_LDFLAGS = "$(inherited)"; OTHER_SWIFT_FLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = TabPageViewController; PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SWIFT_VERSION = 5.0; TARGET_NAME = TabPageViewController; }; name = Release; @@ -539,6 +542,7 @@ LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; OTHER_LDFLAGS = "$(inherited)"; OTHER_SWIFT_FLAGS = "$(inherited)"; + SWIFT_VERSION = 5.0; TARGET_NAME = TabPageViewControllerTests; }; name = Debug; @@ -556,6 +560,7 @@ LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; OTHER_LDFLAGS = "$(inherited)"; OTHER_SWIFT_FLAGS = "$(inherited)"; + SWIFT_VERSION = 5.0; TARGET_NAME = TabPageViewControllerTests; }; name = Release; @@ -571,14 +576,14 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_NS_ASSERTIONS = YES; GCC_OPTIMIZATION_LEVEL = 0; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; ONLY_ACTIVE_ARCH = YES; OTHER_SWIFT_FLAGS = "-DXcode"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; USE_HEADERMAP = NO; }; name = Debug; @@ -593,13 +598,13 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_OPTIMIZATION_LEVEL = s; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; OTHER_SWIFT_FLAGS = "-DXcode"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE; SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; USE_HEADERMAP = NO; }; name = Release; diff --git a/TabPageViewController.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/TabPageViewController.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/TabPageViewController.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Tests/TabPageViewControllerTests/TabPageViewControllerTests.swift b/Tests/TabPageViewControllerTests/TabPageViewControllerTests.swift index b98b886..85e5aea 100644 --- a/Tests/TabPageViewControllerTests/TabPageViewControllerTests.swift +++ b/Tests/TabPageViewControllerTests/TabPageViewControllerTests.swift @@ -5,10 +5,8 @@ class TabPageViewControllerTests: XCTestCase { func testExample() { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct results. - XCTAssertEqual(TabPageViewController().text, "Hello, World!") } - static var allTests : [(String, (TabPageViewControllerTests) -> () throws -> Void)] { return [ ("testExample", testExample),