Skip to content

update swift 4.2 version #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Exmple/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
2 changes: 1 addition & 1 deletion Exmple/BlurParallaxVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class BlurParallaxVC: UIViewController, UITableViewDelegate, UITableViewDataSour
imageView.contentMode = .scaleAspectFill

//setup blur vibrant view
imageView.blurView.setup(style: UIBlurEffectStyle.dark, alpha: 1).enable()
imageView.blurView.setup(style: UIBlurEffect.Style.dark, alpha: 1).enable()

headerImageView = imageView

Expand Down
2 changes: 1 addition & 1 deletion Exmple/BlurRoundIconParallaxVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class BlurRoundIconParallaxVC: UIViewController, UITableViewDelegate, UITableVie
parallaxHeaderView = imageView

//setup bur view
imageView.blurView.setup(style: UIBlurEffectStyle.dark, alpha: 1).enable()
imageView.blurView.setup(style: UIBlurEffect.Style.dark, alpha: 1).enable()

tableView.parallaxHeader.view = imageView
tableView.parallaxHeader.height = 400
Expand Down
18 changes: 9 additions & 9 deletions Exmple/UIView+Blur.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ extension UIView {
* Blur style. After it is changed all subviews on
* blurContentView & vibrancyContentView will be deleted.
*/
var style: UIBlurEffectStyle = .light {
var style: UIBlurEffect.Style = .light {
didSet {
guard oldValue != style,
!editing else { return }
Expand All @@ -76,7 +76,7 @@ extension UIView {
self.superview = view
}

func setup(style: UIBlurEffectStyle, alpha: CGFloat) -> Self {
func setup(style: UIBlurEffect.Style, alpha: CGFloat) -> Self {
self.editing = true

self.style = style
Expand Down Expand Up @@ -104,7 +104,7 @@ extension UIView {
)
}

private func applyBlurEffect(style: UIBlurEffectStyle,
private func applyBlurEffect(style: UIBlurEffect.Style,
blurAlpha: CGFloat) {
superview.backgroundColor = UIColor.clear

Expand All @@ -130,18 +130,18 @@ extension UIView {

private func addAlignedConstrains() {
translatesAutoresizingMaskIntoConstraints = false
addAlignConstraintToSuperview(attribute: NSLayoutAttribute.top)
addAlignConstraintToSuperview(attribute: NSLayoutAttribute.leading)
addAlignConstraintToSuperview(attribute: NSLayoutAttribute.trailing)
addAlignConstraintToSuperview(attribute: NSLayoutAttribute.bottom)
addAlignConstraintToSuperview(attribute: NSLayoutConstraint.Attribute.top)
addAlignConstraintToSuperview(attribute: NSLayoutConstraint.Attribute.leading)
addAlignConstraintToSuperview(attribute: NSLayoutConstraint.Attribute.trailing)
addAlignConstraintToSuperview(attribute: NSLayoutConstraint.Attribute.bottom)
}

private func addAlignConstraintToSuperview(attribute: NSLayoutAttribute) {
private func addAlignConstraintToSuperview(attribute: NSLayoutConstraint.Attribute) {
superview?.addConstraint(
NSLayoutConstraint(
item: self,
attribute: attribute,
relatedBy: NSLayoutRelation.equal,
relatedBy: NSLayoutConstraint.Relation.equal,
toItem: superview,
attribute: attribute,
multiplier: 1,
Expand Down
39 changes: 11 additions & 28 deletions ParallaxHeader.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
objects = {

/* Begin PBXBuildFile section */
837AA184E2E3DE5C748CAC1F /* Pods_Exmple.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FC7EB16BC67AB233D49ED31 /* Pods_Exmple.framework */; };
B50695821F02653C00078D26 /* CollectionVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = B50695811F02653C00078D26 /* CollectionVC.swift */; };
B50695861F02674C00078D26 /* ItemDetailedHeaderDataSourse.swift in Sources */ = {isa = PBXBuildFile; fileRef = B50695851F02674C00078D26 /* ItemDetailedHeaderDataSourse.swift */; };
B50695881F0267D700078D26 /* ItemDetailedImagesDataSourse.swift in Sources */ = {isa = PBXBuildFile; fileRef = B50695871F0267D700078D26 /* ItemDetailedImagesDataSourse.swift */; };
Expand Down Expand Up @@ -37,6 +36,7 @@
B5DB06DE1F028E4D00DD1D43 /* UIView+Blur.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5DB06DD1F028E4D00DD1D43 /* UIView+Blur.swift */; };
B5DB07021F02D1C900DD1D43 /* Demo_with_blur.gif in Resources */ = {isa = PBXBuildFile; fileRef = B5DB07011F02D1C900DD1D43 /* Demo_with_blur.gif */; };
B5DB07041F02D20F00DD1D43 /* ParallaxVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5DB07031F02D20F00DD1D43 /* ParallaxVC.swift */; };
C10CB68EB839634B484CD71A /* Pods_Exmple.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FC7EB16BC67AB233D49ED31 /* Pods_Exmple.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -138,7 +138,7 @@
buildActionMask = 2147483647;
files = (
B5CCB7D21EFD109500194CFB /* ParallaxHeader.framework in Frameworks */,
837AA184E2E3DE5C748CAC1F /* Pods_Exmple.framework in Frameworks */,
C10CB68EB839634B484CD71A /* Pods_Exmple.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -391,7 +391,6 @@
B5CCB7A91EFD0F2300194CFB /* Resources */,
B5CCB7D61EFD109500194CFB /* Embed Frameworks */,
DB2BD7ED3ABE8A85C94D31F6 /* [CP] Embed Pods Frameworks */,
383E94231D2D333DBB6D5C66 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -433,7 +432,6 @@
TargetAttributes = {
B5CCB78C1EFD0E5400194CFB = {
CreatedOnToolsVersion = 8.3.3;
DevelopmentTeam = SWXVWAU9H9;
LastSwiftMigration = 0900;
ProvisioningStyle = Automatic;
};
Expand All @@ -444,7 +442,7 @@
};
B5CCB7AA1EFD0F2300194CFB = {
CreatedOnToolsVersion = 8.3.3;
DevelopmentTeam = SWXVWAU9H9;
DevelopmentTeam = 23CVKL3DB9;
LastSwiftMigration = 0900;
ProvisioningStyle = Automatic;
};
Expand Down Expand Up @@ -537,21 +535,6 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
383E94231D2D333DBB6D5C66 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Exmple/Pods-Exmple-resources.sh\"\n";
showEnvVarsInLog = 0;
};
DB2BD7ED3ABE8A85C94D31F6 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -778,7 +761,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = SWXVWAU9H9;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
Expand All @@ -791,7 +774,7 @@
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -802,7 +785,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = SWXVWAU9H9;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
Expand All @@ -814,7 +797,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down Expand Up @@ -851,14 +834,14 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = SWXVWAU9H9;
DEVELOPMENT_TEAM = 23CVKL3DB9;
INFOPLIST_FILE = Exmple/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.magiclab.Exmple;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -868,14 +851,14 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = SWXVWAU9H9;
DEVELOPMENT_TEAM = 23CVKL3DB9;
INFOPLIST_FILE = Exmple/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.magiclab.Exmple;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Loading