Skip to content

Commit

Permalink
Updates for Swift 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
JanGorman committed Mar 29, 2017
1 parent 4fee2af commit 98c0f2f
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0
3.1
2 changes: 1 addition & 1 deletion Agrume.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "Agrume"
s.version = "3.1.1"
s.version = "3.2.0"
s.summary = "An iOS image viewer written in Swift."

s.description = <<-DESC
Expand Down
4 changes: 2 additions & 2 deletions Agrume.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@
TargetAttributes = {
F2A51FED1B10E00700924912 = {
CreatedOnToolsVersion = 6.3.2;
LastSwiftMigration = 0800;
LastSwiftMigration = 0830;
};
F2A51FF81B10E00700924912 = {
CreatedOnToolsVersion = 6.3.2;
LastSwiftMigration = 0800;
LastSwiftMigration = 0830;
};
};
};
Expand Down
24 changes: 12 additions & 12 deletions Agrume/Agrume.swift
Original file line number Diff line number Diff line change
Expand Up @@ -361,44 +361,44 @@ public final class Agrume: UIViewController {
if initialOrientation == .portrait {
switch (currentDeviceOrientation()) {
case .landscapeLeft:
transform = CGAffineTransform(rotationAngle: CGFloat(M_PI_2))
transform = CGAffineTransform(rotationAngle: .pi / 2)
case .landscapeRight:
transform = CGAffineTransform(rotationAngle: CGFloat(-M_PI_2))
transform = CGAffineTransform(rotationAngle: -(.pi / 2))
case .portraitUpsideDown:
transform = CGAffineTransform(rotationAngle: CGFloat(M_PI))
transform = CGAffineTransform(rotationAngle: .pi)
default:
break
}
} else if initialOrientation == .portraitUpsideDown {
switch (currentDeviceOrientation()) {
case .landscapeLeft:
transform = CGAffineTransform(rotationAngle: CGFloat(-M_PI_2))
transform = CGAffineTransform(rotationAngle: -(.pi / 2))
case .landscapeRight:
transform = CGAffineTransform(rotationAngle: CGFloat(M_PI_2))
transform = CGAffineTransform(rotationAngle: .pi / 2)
case .portrait:
transform = CGAffineTransform(rotationAngle: CGFloat(M_PI))
transform = CGAffineTransform(rotationAngle: .pi)
default:
break
}
} else if initialOrientation == .landscapeLeft {
switch (currentDeviceOrientation()) {
case .landscapeRight:
transform = CGAffineTransform(rotationAngle: CGFloat(M_PI))
transform = CGAffineTransform(rotationAngle: .pi)
case .portrait:
transform = CGAffineTransform(rotationAngle: CGFloat(-M_PI_2))
transform = CGAffineTransform(rotationAngle: -(.pi / 2))
case .portraitUpsideDown:
transform = CGAffineTransform(rotationAngle: CGFloat(M_PI_2))
transform = CGAffineTransform(rotationAngle: .pi / 2)
default:
break
}
} else if initialOrientation == .landscapeRight {
switch (currentDeviceOrientation()) {
case .landscapeLeft:
transform = CGAffineTransform(rotationAngle: CGFloat(M_PI))
transform = CGAffineTransform(rotationAngle: .pi)
case .portrait:
transform = CGAffineTransform(rotationAngle: CGFloat(M_PI_2))
transform = CGAffineTransform(rotationAngle: .pi / 2)
case .portraitUpsideDown:
transform = CGAffineTransform(rotationAngle: CGFloat(-M_PI_2))
transform = CGAffineTransform(rotationAngle: -(.pi / 2))
default:
break
}
Expand Down
4 changes: 2 additions & 2 deletions AgrumeTests/AgrumeServiceLocatorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import XCTest

class AgrumeServiceLocatorTests: XCTestCase {

private let mockViewController = UIViewController()
private var agrume: Agrume!
fileprivate let mockViewController = UIViewController()
fileprivate var agrume: Agrume!

override func setUp() {
super.setUp()
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ An iOS image viewer written in Swift with support for multiple images.

## Requirements

- Swift 3.0
- Swift 3.1 (for Swift 3.0 support, use tag 3.1.1)
- iOS 8.0+
- Xcode 8+

Expand Down

0 comments on commit 98c0f2f

Please sign in to comment.