Skip to content

Commit

Permalink
Swift 4.2 & Eureka 4.3.0
Browse files Browse the repository at this point in the history
Updates for Carthage
  • Loading branch information
marbetschar committed Jan 2, 2019
1 parent e280270 commit 660e64d
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "xmartlabs/Eureka" ~> 4.1
github "xmartlabs/Eureka" ~> 4.3
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "xmartlabs/Eureka" "4.1.1"
github "xmartlabs/Eureka" "4.3.1"
2 changes: 1 addition & 1 deletion Example/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,22 @@ Then run the following command:
$ pod install
```

#### Carthage

[Carthage](https://github.com/Carthage/Carthage) is a simple, decentralized dependency manager for Cocoa.

Specify SplitRow into your project's `Cartfile`:

```
github "EurekaCommunity/SplitRow" ~> 1.3
```

Then run the following command:

```bash
$ carthage bootstrap --platform iOS
```

## Usage

```swift
Expand Down
8 changes: 4 additions & 4 deletions SplitRow.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = swiss.mandelkind.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -614,7 +614,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = swiss.mandelkind.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -641,7 +641,7 @@
PRODUCT_NAME = SplitRow;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -667,7 +667,7 @@
PRODUCT_BUNDLE_IDENTIFIER = swiss.mandelkind.SplitRow;
PRODUCT_NAME = SplitRow;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
<key>orderHint</key>
<integer>2</integer>
</dict>
<key>Example.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>6</integer>
</dict>
<key>SplitRowTests.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>5</integer>
</dict>
<key>[CP] SplitRow.xcscheme</key>
<dict>
<key>orderHint</key>
Expand All @@ -17,7 +27,7 @@
<key>[Carthage] SplitRow.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
Expand Down
2 changes: 1 addition & 1 deletion SplitRow/SplitRowCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ open class SplitRowCell<L: RowType, R: RowType>: Cell<SplitRowValue<L.Cell.Value

//TODO: If we use UITableViewAutomaticDimension instead of 44.0 we encounter constraint errors :(
let maxRowHeight = max(row.rowLeft?.cell?.height?() ?? 44.0, row.rowRight?.cell?.height?() ?? 44.0)
if maxRowHeight != UITableView.automaticDimension{
if maxRowHeight != UITableView.automaticDimension{
self.height = { maxRowHeight }
row.rowLeft?.cell?.height = self.height
row.rowRight?.cell?.height = self.height
Expand Down
2 changes: 1 addition & 1 deletion SplitRow/SplitRowCellTableView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class SplitRowCellTableView<T: TypedRowType>: UITableView, UITableViewDelegate,
separatorView.translatesAutoresizingMaskIntoConstraints = false

cell.addSubview(separatorView)
cell.bringSubviewToFront(separatorView)
cell.bringSubviewToFront(separatorView)

cell.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "H:|[separatorView(1)]", options: [], metrics: nil, views: ["separatorView":separatorView]))
cell.addConstraint(NSLayoutConstraint(item: separatorView, attribute: .top, relatedBy: .equal, toItem: cell, attribute: .top, multiplier: 1.0, constant: 11.0))
Expand Down

0 comments on commit 660e64d

Please sign in to comment.