diff --git a/Cartfile b/Cartfile index ce71727..75aece3 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "teambition/RefreshView" "master" +github "teambition/RefreshView" diff --git a/Cartfile.resolved b/Cartfile.resolved index 0a56a30..972aa42 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1 +1 @@ -github "teambition/RefreshView" "a562333fa27b6f5ef41efb13014aedb5befec3c8" +github "teambition/RefreshView" "1.2.0" diff --git a/STTableBoard.xcodeproj/project.pbxproj b/STTableBoard.xcodeproj/project.pbxproj index 6d7fbf4..57c92fb 100644 --- a/STTableBoard.xcodeproj/project.pbxproj +++ b/STTableBoard.xcodeproj/project.pbxproj @@ -250,12 +250,12 @@ EB793B0A1C1E608900BF1148 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = StormXX; TargetAttributes = { EB793B121C1E608900BF1148 = { CreatedOnToolsVersion = 7.2; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; }; }; @@ -325,14 +325,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -361,6 +367,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -375,14 +382,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -404,6 +417,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -433,7 +447,8 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -458,7 +473,8 @@ PRODUCT_BUNDLE_IDENTIFIER = com.StormXX.STTableBoard; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/STTableBoard.xcodeproj/xcshareddata/xcschemes/STTableBoard.xcscheme b/STTableBoard.xcodeproj/xcshareddata/xcschemes/STTableBoard.xcscheme index 3536c53..757c598 100644 --- a/STTableBoard.xcodeproj/xcshareddata/xcschemes/STTableBoard.xcscheme +++ b/STTableBoard.xcodeproj/xcshareddata/xcschemes/STTableBoard.xcscheme @@ -1,6 +1,6 @@ @@ -36,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/STTableBoard/Extensions/STTableBoardExtensions.swift b/STTableBoard/Extensions/STTableBoardExtensions.swift index 0b43f8f..aec959e 100644 --- a/STTableBoard/Extensions/STTableBoardExtensions.swift +++ b/STTableBoard/Extensions/STTableBoardExtensions.swift @@ -10,13 +10,13 @@ import UIKit //MARK: - double tap extension STTableBoard { - func handleDoubleTap(_ recognizer: UIGestureRecognizer) { + @objc func handleDoubleTap(_ recognizer: UIGestureRecognizer) { tapPosition = recognizer.location(in: containerView) dataSource?.tableBoard(self, scaleTableBoard: tableBoardMode == .page) switchMode() } - func handlePinch(_ recognizer: UIPinchGestureRecognizer) { + @objc func handlePinch(_ recognizer: UIPinchGestureRecognizer) { delegate?.tableBoard(self, handlePinchGesture: recognizer) } @@ -47,7 +47,7 @@ extension STTableBoard { //MARK: - long press drag for board extension STTableBoard { - func handleLongPressGestureForBoard(_ recognizer: UIGestureRecognizer) { + @objc func handleLongPressGestureForBoard(_ recognizer: UIGestureRecognizer) { switch recognizer.state { case .began: startMovingBoard(recognizer) @@ -142,7 +142,7 @@ extension STTableBoard { //MARK: - long press drag for cell extension STTableBoard { - func handleLongPressGestureForCell(_ recognizer: UIGestureRecognizer) { + @objc func handleLongPressGestureForCell(_ recognizer: UIGestureRecognizer) { switch recognizer.state { case .began: startMovingRow(recognizer) @@ -404,7 +404,7 @@ extension STTableBoard { tableViewAutoScrollDistance = min(tableViewAutoScrollDistance, maximumDistance) } - func tableViewAutoScrollTimerFired(_ timer: Timer) { + @objc func tableViewAutoScrollTimerFired(_ timer: Timer) { guard let userInfo = timer.userInfo as? [String:AnyObject], let tableView = userInfo[timerUserInfoTableViewKey] as? STShadowTableView else { return } optimizeTableViewScrollDistance(tableView) diff --git a/STTableBoard/Info.plist b/STTableBoard/Info.plist index d3de8ee..c941094 100644 --- a/STTableBoard/Info.plist +++ b/STTableBoard/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0 + 0.4.0 CFBundleSignature ???? CFBundleVersion diff --git a/STTableBoard/ViewControllers/STTableBoard.swift b/STTableBoard/ViewControllers/STTableBoard.swift index feb5c26..39af0ca 100644 --- a/STTableBoard/ViewControllers/STTableBoard.swift +++ b/STTableBoard/ViewControllers/STTableBoard.swift @@ -292,9 +292,9 @@ open class STTableBoard: UIViewController { scrollView.frame = CGRect(origin: CGPoint.zero, size: size) scrollView.contentSize = CGSize(width: scrollView.contentSize.width, height: size.height) containerView.frame = CGRect(origin: CGPoint.zero, size: scrollView.contentSize) - UIView.animate(withDuration: 0.5, animations: { (finished) in + UIView.animate(withDuration: 0.5) { self.pageControl.frame = CGRect(x: 0, y: size.height - self.pageControl.height, width: size.width, height: pageControlHeight) - }) + } boards.forEach { (board) -> () in autoAdjustTableBoardHeight(board, animated: true) } @@ -319,7 +319,7 @@ open class STTableBoard: UIViewController { //MARK: - response method extension STTableBoard { - func keyboardWillShow(_ notification: Notification) { + @objc func keyboardWillShow(_ notification: Notification) { if let userInfo = notification.userInfo, let keyboardFrameValue = userInfo[UIKeyboardFrameEndUserInfoKey] as? NSValue { let keyboardFrame = keyboardFrameValue.cgRectValue let keyboardHeight = keyboardFrame.height @@ -337,7 +337,7 @@ extension STTableBoard { } } - func keyboardWillHide(_ notification: Notification) { + @objc func keyboardWillHide(_ notification: Notification) { guard let _ = self.originFrame else { return } UIView.animate(withDuration: 0.33, animations: { [weak self]() -> Void in guard let `self` = self else { return } diff --git a/STTableBoard/Views/NewBoardButton.swift b/STTableBoard/Views/NewBoardButton.swift index 753fac4..2001a67 100644 --- a/STTableBoard/Views/NewBoardButton.swift +++ b/STTableBoard/Views/NewBoardButton.swift @@ -78,7 +78,7 @@ class NewBoardButton: UIView { NSLayoutConstraint.activate(horizontalConstraints + [imageViewHeight, imageViewCenterY]) } - func viewDidBeClicked() { + @objc func viewDidBeClicked() { delegate?.newBoardButtonDidBeClicked(newBoardButton: self) } diff --git a/STTableBoard/Views/STBoardFooterView.swift b/STTableBoard/Views/STBoardFooterView.swift index c74eff3..bea6703 100644 --- a/STTableBoard/Views/STBoardFooterView.swift +++ b/STTableBoard/Views/STBoardFooterView.swift @@ -45,7 +45,7 @@ class STBoardFooterView: UIView { NSLayoutConstraint.activate(titleButtonHorizontalConstraints + titleButtonVerticalConstraints) } - func addButtonTapped(_ sender: UIButton?) { + @objc func addButtonTapped(_ sender: UIButton?) { if let boardView = boardView, let customAction = boardView.delegate?.customAddRowAction(for: boardView) { customAction() return diff --git a/STTableBoard/Views/STBoardHeaderView.swift b/STTableBoard/Views/STBoardHeaderView.swift index 9a6c75e..68d812b 100644 --- a/STTableBoard/Views/STBoardHeaderView.swift +++ b/STTableBoard/Views/STBoardHeaderView.swift @@ -29,8 +29,8 @@ class STBoardHeaderView: UIView { label.textAlignment = .left label.font = TableBoardCommonConstant.labelFont label.textColor = UIColor.darkGrayTextColor - label.setContentHuggingPriority(UILayoutPriorityDefaultHigh, for: .horizontal) - label.setContentCompressionResistancePriority(UILayoutPriorityDefaultLow, for: .horizontal) + label.setContentHuggingPriority(.defaultHigh, for: .horizontal) + label.setContentCompressionResistancePriority(.defaultLow, for: .horizontal) return label }() @@ -39,7 +39,7 @@ class STBoardHeaderView: UIView { label.textAlignment = .left label.font = TableBoardCommonConstant.labelFont label.textColor = UIColor.darkGrayTextColor - label.setContentCompressionResistancePriority(UILayoutPriorityDefaultHigh, for: .horizontal) + label.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal) return label }() @@ -92,7 +92,7 @@ class STBoardHeaderView: UIView { } - func actionButtonBeClicked(_ sender: UIButton) { + @objc func actionButtonBeClicked(_ sender: UIButton) { if let boardView = boardView { boardView.delegate?.boardView(boardView, didClickBoardMenuButton: sender) } diff --git a/STTableBoard/Views/TextComposeView.swift b/STTableBoard/Views/TextComposeView.swift index 940540f..9fe29cd 100644 --- a/STTableBoard/Views/TextComposeView.swift +++ b/STTableBoard/Views/TextComposeView.swift @@ -90,12 +90,12 @@ class TextComposeView: UIView { self.init(frame: frame, textFieldHeight: 56.0, cornerRadius: 4.0) } - func cancelButtonClicked(_ sender: UIButton) { + @objc func cancelButtonClicked(_ sender: UIButton) { textField.resignFirstResponder() delegate?.textComposeView(textComposeView: self, didClickCancelButton: sender) } - func doneButtonClicked(_ sender: UIButton) { + @objc func doneButtonClicked(_ sender: UIButton) { if let text = textField.text { let trimedText = text.trim() if trimedText.characters.count > 0 { diff --git a/STTableBoardDemo.xcodeproj/project.pbxproj b/STTableBoardDemo.xcodeproj/project.pbxproj index c5aaf43..f313cce 100644 --- a/STTableBoardDemo.xcodeproj/project.pbxproj +++ b/STTableBoardDemo.xcodeproj/project.pbxproj @@ -176,13 +176,13 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = StormXX; TargetAttributes = { EB793BA51C1E653400BF1148 = { CreatedOnToolsVersion = 7.2; - DevelopmentTeam = DHNJ8N28ZZ; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; + ProvisioningStyle = Manual; }; }; }; @@ -266,14 +266,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -301,6 +307,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -312,14 +319,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -340,6 +353,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.0; VALIDATE_PRODUCT = YES; }; name = Release; @@ -350,7 +364,8 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - DEVELOPMENT_TEAM = DHNJ8N28ZZ; + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -362,7 +377,9 @@ PRODUCT_BUNDLE_IDENTIFIER = com.StormXX.STTableBoardDemo; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; - SWIFT_VERSION = 3.0; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -373,7 +390,8 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - DEVELOPMENT_TEAM = DHNJ8N28ZZ; + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -385,7 +403,9 @@ PRODUCT_BUNDLE_IDENTIFIER = com.StormXX.STTableBoardDemo; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; - SWIFT_VERSION = 3.0; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/STTableBoardDemo/BadgeListView/BadgeView.swift b/STTableBoardDemo/BadgeListView/BadgeView.swift index f571f78..b9295f3 100644 --- a/STTableBoardDemo/BadgeListView/BadgeView.swift +++ b/STTableBoardDemo/BadgeListView/BadgeView.swift @@ -89,7 +89,7 @@ open class BadgeView: UIView { } override open var intrinsicContentSize : CGSize { - var size = titleLabel.text?.size(attributes: [NSFontAttributeName: textFont]) ?? CGSize.zero + var size = titleLabel.text?.size(withAttributes: [.font: textFont]) ?? CGSize.zero size.height += 2 * titlePaddingY if let _ = image { diff --git a/STTableBoardDemo/Base.lproj/LaunchScreen.storyboard b/STTableBoardDemo/Base.lproj/LaunchScreen.storyboard index 78686cd..c0c6e6e 100644 --- a/STTableBoardDemo/Base.lproj/LaunchScreen.storyboard +++ b/STTableBoardDemo/Base.lproj/LaunchScreen.storyboard @@ -1,8 +1,12 @@ - - + + + + + - + + @@ -14,9 +18,9 @@ - + - + diff --git a/STTableBoardDemo/Base.lproj/Main.storyboard b/STTableBoardDemo/Base.lproj/Main.storyboard index 58e097c..ba9b447 100644 --- a/STTableBoardDemo/Base.lproj/Main.storyboard +++ b/STTableBoardDemo/Base.lproj/Main.storyboard @@ -1,11 +1,11 @@ - - + + - + @@ -22,10 +22,10 @@ @@ -39,7 +39,7 @@ - + @@ -64,22 +64,7 @@ - - - - - - - - - - - - - - - - + @@ -88,7 +73,7 @@ - + @@ -98,12 +83,11 @@ - + - @@ -115,6 +99,7 @@ + diff --git a/STTableBoardDemo/Info.plist b/STTableBoardDemo/Info.plist index 6f460e0..afc67a8 100644 --- a/STTableBoardDemo/Info.plist +++ b/STTableBoardDemo/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0 + 0.4.0 CFBundleSignature ???? CFBundleVersion diff --git a/STTableBoardDemo/ViewController+STTableBoard.swift b/STTableBoardDemo/ViewController+STTableBoard.swift index 1c29324..c76c3e3 100644 --- a/STTableBoardDemo/ViewController+STTableBoard.swift +++ b/STTableBoardDemo/ViewController+STTableBoard.swift @@ -47,7 +47,7 @@ extension ViewController: STTableBoardDelegate { func tableBoard(_ tableBoard: STTableBoard, didSelectRowAt indexPath: STIndexPath) { print("board \(indexPath.board) row \(indexPath.row)") if let cell = tableBoard.cellForRowAtIndexPath(indexPath) as? BoardCardCell { - print("cell's title \(cell.titleText)") + print("cell's title \(String(describing: cell.titleText))") } let viewController = UIViewController() viewController.view.backgroundColor = UIColor.white diff --git a/STTableBoardDemo/ViewController.swift b/STTableBoardDemo/ViewController.swift index d7bf54b..f87f24e 100644 --- a/STTableBoardDemo/ViewController.swift +++ b/STTableBoardDemo/ViewController.swift @@ -79,7 +79,7 @@ class ViewController: UIViewController { navigationItem.rightBarButtonItem = doneButton } - func doneButtonClick() { + @objc func doneButtonClick() { tableBoard.reloadData(false, resetMode: true) } @@ -178,7 +178,7 @@ extension ViewController { fileprivate func layoutView() { tableBoard.view.translatesAutoresizingMaskIntoConstraints = false - let views = ["tableBoard": tableBoard.view] + let views: [String: Any] = ["tableBoard": tableBoard.view] let horizontalConstraints = NSLayoutConstraint.constraints(withVisualFormat: "H:|[tableBoard]|", options: [], metrics: nil, views: views) let top = NSLayoutConstraint(item: tableBoard.view, attribute: .top, relatedBy: .equal, toItem: containerView, attribute: .bottom, multiplier: 1, constant: 0) let bottom = NSLayoutConstraint(item: tableBoard.view, attribute: .bottom, relatedBy: .equal, toItem: bottomLayoutGuide, attribute: .top, multiplier: 1, constant: 0) @@ -196,9 +196,9 @@ extension ViewController { fileprivate func animateExitFullScreenView() { let constant = isBarHidden ? 0 : ExitFullScreenViewConstant.height bottomConstraintForExitFullScreenView.constant = constant - UIView.animate(withDuration: 0.33, animations: { (finished) in + UIView.animate(withDuration: 0.33) { self.view.layoutIfNeeded() - }) + } } fileprivate func enterFullScreen() { @@ -248,7 +248,7 @@ extension ViewController { } extension ViewController { - func exitFullScreenTapped() { + @objc func exitFullScreenTapped() { exitFullScreen() } }