Skip to content

Commit

Permalink
Update for Swift 5 and iOS 13 SDK (#21)
Browse files Browse the repository at this point in the history
* Update to Swift 5 / iOS 13 SDK

* Bump version

* Move images, update readme

* Update travis for new xcpretty version
  • Loading branch information
moritzsternemann committed Oct 12, 2019
1 parent baad836 commit d685872
Show file tree
Hide file tree
Showing 34 changed files with 62 additions and 96 deletions.
File renamed without changes
Binary file added .github/images/swipycell-hero.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion .swift-version
@@ -1 +1 @@
4.0
5.1
6 changes: 3 additions & 3 deletions .travis.yml
Expand Up @@ -2,16 +2,16 @@ language: objective-c

xcode_project: SwipyCell.xcodeproj
xcode_scheme: SwipyCell
osx_image: xcode10
xcode_sdk: iphonesimulator12.0
osx_image: xcode11.1
xcode_sdk: iphonesimulator13.1

branches:
except:
- develop

before_install:
- gem update cocoapods
- gem install xcpretty --no-rdoc --no-ri --no-document --quiet
- gem install xcpretty --quiet

script:
- xcodebuild -project SwipyCell.xcodeproj -scheme SwipyCell -sdk iphonesimulator clean build | xcpretty
Expand Down
87 changes: 26 additions & 61 deletions Example/SwipyCellExample.xcodeproj/project.pbxproj
Expand Up @@ -7,11 +7,11 @@
objects = {

/* Begin PBXBuildFile section */
8E5B0746235220F100E9F885 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8E5B0744235220F000E9F885 /* LaunchScreen.storyboard */; };
8E5B0747235220F100E9F885 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8E5B0745235220F000E9F885 /* Main.storyboard */; };
8EB860BA1C98666B00DB393C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EB860B11C98666B00DB393C /* AppDelegate.swift */; };
8EB860BF1C98666B00DB393C /* SwipyCellViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EB860B91C98666B00DB393C /* SwipyCellViewController.swift */; };
8EB860CE1C98670000DB393C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8EB860C71C98670000DB393C /* Assets.xcassets */; };
8EB860CF1C98670000DB393C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8EB860C91C98670000DB393C /* LaunchScreen.storyboard */; };
8EB860D01C98670000DB393C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8EB860CB1C98670000DB393C /* Main.storyboard */; };
8EB860E31C9B00D300DB393C /* SwipyCell.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8EB860C51C98669800DB393C /* SwipyCell.framework */; };
8EB860E41C9B00D300DB393C /* SwipyCell.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8EB860C51C98669800DB393C /* SwipyCell.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -48,14 +48,14 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
8E5B0744235220F000E9F885 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
8E5B0745235220F000E9F885 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
8EB8609C1C98661E00DB393C /* SwipyCellExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwipyCellExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
8EB860B11C98666B00DB393C /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = Source/AppDelegate.swift; sourceTree = SOURCE_ROOT; };
8EB860B91C98666B00DB393C /* SwipyCellViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SwipyCellViewController.swift; path = Source/SwipyCellViewController.swift; sourceTree = SOURCE_ROOT; };
8EB860B11C98666B00DB393C /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = SwipyCellExample/AppDelegate.swift; sourceTree = SOURCE_ROOT; };
8EB860B91C98666B00DB393C /* SwipyCellViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SwipyCellViewController.swift; path = SwipyCellExample/SwipyCellViewController.swift; sourceTree = SOURCE_ROOT; };
8EB860C01C98669800DB393C /* SwipyCell.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SwipyCell.xcodeproj; path = ../SwipyCell.xcodeproj; sourceTree = "<group>"; };
8EB860C71C98670000DB393C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Resources/Assets.xcassets; sourceTree = SOURCE_ROOT; };
8EB860CA1C98670000DB393C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
8EB860CC1C98670000DB393C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Main.storyboard; sourceTree = "<group>"; };
8EB860CD1C98670000DB393C /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Resources/Info.plist; sourceTree = SOURCE_ROOT; };
8EB860C71C98670000DB393C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = SwipyCellExample/Assets.xcassets; sourceTree = SOURCE_ROOT; };
8EB860CD1C98670000DB393C /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = SwipyCellExample/Info.plist; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -73,7 +73,7 @@
8EB860931C98661E00DB393C = {
isa = PBXGroup;
children = (
8EB8609E1C98661E00DB393C /* Source */,
8EB8609E1C98661E00DB393C /* SwipyCellExample */,
8EB8609D1C98661E00DB393C /* Products */,
8EB860C01C98669800DB393C /* SwipyCell.xcodeproj */,
);
Expand All @@ -87,14 +87,17 @@
name = Products;
sourceTree = "<group>";
};
8EB8609E1C98661E00DB393C /* Source */ = {
8EB8609E1C98661E00DB393C /* SwipyCellExample */ = {
isa = PBXGroup;
children = (
8EB860B11C98666B00DB393C /* AppDelegate.swift */,
8EB860B91C98666B00DB393C /* SwipyCellViewController.swift */,
8EB860C61C9866ED00DB393C /* Supporting Files */,
8EB860C71C98670000DB393C /* Assets.xcassets */,
8E5B0744235220F000E9F885 /* LaunchScreen.storyboard */,
8E5B0745235220F000E9F885 /* Main.storyboard */,
8EB860CD1C98670000DB393C /* Info.plist */,
);
path = Source;
path = SwipyCellExample;
sourceTree = "<group>";
};
8EB860C11C98669800DB393C /* Products */ = {
Expand All @@ -105,26 +108,6 @@
name = Products;
sourceTree = "<group>";
};
8EB860C61C9866ED00DB393C /* Supporting Files */ = {
isa = PBXGroup;
children = (
8EB860CD1C98670000DB393C /* Info.plist */,
8EB860C71C98670000DB393C /* Assets.xcassets */,
8EB860C81C98670000DB393C /* Base.lproj */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
8EB860C81C98670000DB393C /* Base.lproj */ = {
isa = PBXGroup;
children = (
8EB860C91C98670000DB393C /* LaunchScreen.storyboard */,
8EB860CB1C98670000DB393C /* Main.storyboard */,
);
name = Base.lproj;
path = Resources/Base.lproj;
sourceTree = SOURCE_ROOT;
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -154,23 +137,22 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 1000;
LastUpgradeCheck = 1110;
ORGANIZATIONNAME = "Moritz Sternemann";
TargetAttributes = {
8EB8609B1C98661E00DB393C = {
CreatedOnToolsVersion = 7.2.1;
DevelopmentTeam = AXTR5X4T2F;
LastSwiftMigration = 1000;
LastSwiftMigration = 1110;
};
};
};
buildConfigurationList = 8EB860971C98661E00DB393C /* Build configuration list for PBXProject "SwipyCellExample" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 8EB860931C98661E00DB393C;
productRefGroup = 8EB8609D1C98661E00DB393C /* Products */;
Expand Down Expand Up @@ -203,9 +185,9 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8EB860D01C98670000DB393C /* Main.storyboard in Resources */,
8E5B0747235220F100E9F885 /* Main.storyboard in Resources */,
8EB860CE1C98670000DB393C /* Assets.xcassets in Resources */,
8EB860CF1C98670000DB393C /* LaunchScreen.storyboard in Resources */,
8E5B0746235220F100E9F885 /* LaunchScreen.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -231,25 +213,6 @@
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
8EB860C91C98670000DB393C /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
8EB860CA1C98670000DB393C /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
8EB860CB1C98670000DB393C /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
8EB860CC1C98670000DB393C /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
8EB860AC1C98661E00DB393C /* Debug */ = {
isa = XCBuildConfiguration;
Expand Down Expand Up @@ -359,12 +322,13 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
INFOPLIST_FILE = "$(SRCROOT)/Resources/Info.plist";
INFOPLIST_FILE = "$(SRCROOT)/SwipyCellExample/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 4.0.1;
PRODUCT_BUNDLE_IDENTIFIER = de.moritzsternemann.SwipyCellExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -375,11 +339,12 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
INFOPLIST_FILE = "$(SRCROOT)/Resources/Info.plist";
INFOPLIST_FILE = "$(SRCROOT)/SwipyCellExample/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 4.0.1;
PRODUCT_BUNDLE_IDENTIFIER = de.moritzsternemann.SwipyCellExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
File renamed without changes.
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.0.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15400" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina5_9" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15404"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
Expand All @@ -14,9 +16,9 @@
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion PlaygroundBook/README.md
Expand Up @@ -4,7 +4,7 @@

The purpose of this Playground book is to teach people the basics of using SwipyCell.

<p align="center"><img src="https://raw.githubusercontent.com/moritzsternemann/SwipyCell/master/github-assets/swipycellbook.png?raw=true" width="75%"/></p>
<p align="center"><img src="../.github/images/swipycellbook.png" width="75%"/></p>

### Usage
You can download the playground book bundle including the latest version of SwipyCell from the [releases page of this repository](https://github.com/moritzsternemann/SwipyCell/releases).
Expand Down
12 changes: 6 additions & 6 deletions README.md
@@ -1,25 +1,25 @@
SwipyCell
---------
[![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)
[![Swift 4.2](https://img.shields.io/badge/Swift-4.2-orange.svg?style=flat)](https://developer.apple.com/swift/)
[![Swift 4.2](https://img.shields.io/badge/Swift-5.1-orange.svg?style=flat)](https://developer.apple.com/swift/)
[![Build Status](https://travis-ci.org/moritzsternemann/SwipyCell.svg)](https://travis-ci.org/moritzsternemann/SwipyCell)
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/SwipyCell.svg)](https://github.com/moritzsternemann/SwipyCell)
[![Platform](https://img.shields.io/cocoapods/p/SwipyCell.svg)](https://github.com/moritzsternemann/SwipyCell)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/moritzsternemann/SwipyCell/master/LICENSE)
[![Twitter](https://img.shields.io/badge/twitter-@iMoritzS-blue.svg?style=flat)](https://twitter.com/iMoritzS)
[![Twitter](https://img.shields.io/badge/twitter-@strnmn-blue.svg?style=flat)](https://twitter.com/strnmn)

*Swipeable UITableViewCell inspired by the popular [Mailbox App](http://mailboxapp.com), implemented in [Swift](https://github.com/apple/swift).*

<p align="center"><img src="https://raw.githubusercontent.com/moritzsternemann/SwipyCell/master/github-assets/swipycell-hero.png?raw=true" width="50%"/></p>
<p align="center"><img src=".github/images/swipycell-hero.jpg" width="50%"/></p>

## Preview
### Exit Mode
The `.exit` mode is the original behavior, known from the Mailbox app.
<p align="center"><img src="https://raw.githubusercontent.com/moritzsternemann/SwipyCell/master/github-assets/swipycell-exit.gif?raw=true" width="50%"/></p>
<p align="center"><img src=".github/images/swipycell-exit.gif" width="50%"/></p>

### Toggle Mode
The `.toggle` is another behavior where the cell will bounce back after swiping it.
<p align="center"><img src="https://raw.githubusercontent.com/moritzsternemann/SwipyCell/master/github-assets/swipycell-switch.gif?raw=true" width="50%"/></p>
<p align="center"><img src=".github/images/swipycell-switch.gif" width="50%"/></p>

## Installation
### CocoaPods
Expand Down Expand Up @@ -47,7 +47,7 @@ $ brew install carthage

To integrate SwipyCell into your project using Carthage, add it to your `Cartfile`:
```
github "moritzsternemann/SwipyCell" >= 3.3
github "moritzsternemann/SwipyCell" >= 4.0
```

### Manual
Expand Down
2 changes: 1 addition & 1 deletion Source/Info.plist
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.0.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
8 changes: 4 additions & 4 deletions Source/SwipyCellTypes.swift
Expand Up @@ -46,15 +46,15 @@ public enum SwipyCellState: Hashable {
case none
case state(Int, SwipyCellDirection)

public var hashValue: Int {
return self.toInt()
public func hash(into hasher: inout Hasher) {
hasher.combine(integerRepresentation)
}

static public func ==(lhs: SwipyCellState, rhs: SwipyCellState) -> Bool {
return lhs.toInt() == rhs.toInt()
return lhs.integerRepresentation == rhs.integerRepresentation
}

private func toInt() -> Int {
private var integerRepresentation: Int {
switch self {
case .none:
return 0
Expand Down
2 changes: 1 addition & 1 deletion SwipyCell.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "SwipyCell"
s.version = "4.0.0"
s.version = "4.0.1"
s.summary = "Easy to use UITableViewCell implementing swiping to trigger actions (known from the Mailbox App)"
s.homepage = "https://github.com/moritzsternemann/SwipyCell"
s.license = { :type => "MIT", :file => "LICENSE" }
Expand Down

0 comments on commit d685872

Please sign in to comment.