Skip to content

Commit

Permalink
Merge branch 'swift-2.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
sberrevoets committed Sep 11, 2016
2 parents b0ee319 + 445fc19 commit 304669c
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 8 deletions.
6 changes: 6 additions & 0 deletions Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,11 @@
TargetAttributes = {
D2515E6E1BC1A47F00ED606F = {
CreatedOnToolsVersion = 7.0.1;
LastSwiftMigration = 0800;
};
D2C0AFCC1BE7236A00F31D0F = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0800;
TestTargetID = D2515E6E1BC1A47F00ED606F;
};
};
Expand Down Expand Up @@ -385,6 +387,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 2.3;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -401,6 +404,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.ScottyDoesntCode.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_VERSION = 2.3;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -413,6 +417,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.ScottyDoesntCode.SDCAlertView-UI-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
TEST_TARGET_NAME = Example;
USES_XCTRUNNER = YES;
};
Expand All @@ -426,6 +431,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.ScottyDoesntCode.SDCAlertView-UI-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
TEST_TARGET_NAME = Example;
USES_XCTRUNNER = YES;
};
Expand Down
3 changes: 3 additions & 0 deletions SDCAlertView.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@
TargetAttributes = {
D2515EC01BC1A7D500ED606F = {
CreatedOnToolsVersion = 7.0.1;
LastSwiftMigration = 0800;
};
};
};
Expand Down Expand Up @@ -295,6 +296,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 2.3;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand Down Expand Up @@ -323,6 +325,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.ScottyDoesntCode.SDCAlertView;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 2.3;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand Down
2 changes: 1 addition & 1 deletion Source/Presentation/AnimationController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class AnimationController: NSObject, UIViewControllerAnimatedTransitioning {
}

if self.isPresentation {
transitionContext.containerView()?.addSubview(toView)
transitionContext.containerView().addSubview(toView)
}

let animatingController = self.isPresentation ? toController : fromController
Expand Down
2 changes: 1 addition & 1 deletion Source/Presentation/PresentationController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class PresentationController: UIPresentationController {

private let dimmingView = UIView()

override init(presentedViewController: UIViewController, presentingViewController: UIViewController) {
override init(presentedViewController: UIViewController, presentingViewController: UIViewController?) {
super.init(presentedViewController: presentedViewController,
presentingViewController: presentingViewController)
self.dimmingView.backgroundColor = UIColor(white: 0, alpha: 0.4)
Expand Down
2 changes: 1 addition & 1 deletion Source/Presentation/Transition.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Transition: NSObject, UIViewControllerTransitioningDelegate {
}

func presentationControllerForPresentedViewController(presented: UIViewController,
presentingViewController presenting: UIViewController, sourceViewController source: UIViewController)
presentingViewController presenting: UIViewController?, sourceViewController source: UIViewController)
-> UIPresentationController?
{
return PresentationController(presentedViewController: presented,
Expand Down
6 changes: 3 additions & 3 deletions Source/Views/ActionSheetView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ private extension UIImage {

UIGraphicsBeginImageContextWithOptions(rect.size, false, 0)

let context = UIGraphicsGetCurrentContext()
let context = UIGraphicsGetCurrentContext()!
color.setFill()
CGContextFillRect(context, rect)

let image = UIGraphicsGetImageFromCurrentImageContext()
let image = UIGraphicsGetImageFromCurrentImageContext()!
UIGraphicsEndImageContext()

return image;
return image
}
}
4 changes: 2 additions & 2 deletions Source/Views/AlertView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class AlertView: AlertControllerView {

private func createMessageLabelConstraints() {
self.addConstraint(NSLayoutConstraint(item: self.messageLabel, attribute: .FirstBaseline,
relatedBy: .Equal, toItem: self.titleLabel, attribute: .Baseline , multiplier: 1,
relatedBy: .Equal, toItem: self.titleLabel, attribute: .LastBaseline , multiplier: 1,
constant: self.visualStyle.verticalElementSpacing))
let contentPadding = self.visualStyle.contentPadding
let insets = UIEdgeInsets(top: 0, left: contentPadding.left, bottom: 0, right: -contentPadding.right)
Expand All @@ -147,7 +147,7 @@ class AlertView: AlertControllerView {
let widthOffset = self.visualStyle.contentPadding.left + self.visualStyle.contentPadding.right

self.addConstraint(NSLayoutConstraint(item: textFieldsView, attribute: .Top, relatedBy: .Equal,
toItem: self.messageLabel, attribute: .Baseline, multiplier: 1,
toItem: self.messageLabel, attribute: .LastBaseline, multiplier: 1,
constant: self.visualStyle.verticalElementSpacing))

textFieldsView.sdc_pinWidthToWidthOfView(self, offset: -widthOffset)
Expand Down

0 comments on commit 304669c

Please sign in to comment.