Skip to content
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@ fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output

# XCUser data
ParallaxHeader.xcworkspace/xcshareddata/
ParallaxHeader.xcworkspace/xcshareddata/*
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
52 changes: 18 additions & 34 deletions ParallaxHeader.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
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 @@ -428,13 +427,13 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0830;
LastUpgradeCheck = 0900;
LastUpgradeCheck = 1000;
ORGANIZATIONNAME = MagicLab;
TargetAttributes = {
B5CCB78C1EFD0E5400194CFB = {
CreatedOnToolsVersion = 8.3.3;
DevelopmentTeam = SWXVWAU9H9;
LastSwiftMigration = 0900;
LastSwiftMigration = 1000;
ProvisioningStyle = Automatic;
};
B5CCB7951EFD0E5500194CFB = {
Expand All @@ -445,13 +444,13 @@
B5CCB7AA1EFD0F2300194CFB = {
CreatedOnToolsVersion = 8.3.3;
DevelopmentTeam = SWXVWAU9H9;
LastSwiftMigration = 0900;
LastSwiftMigration = 1000;
ProvisioningStyle = Automatic;
};
B5CCB7BD1EFD0F2300194CFB = {
CreatedOnToolsVersion = 8.3.3;
DevelopmentTeam = SWXVWAU9H9;
LastSwiftMigration = 0900;
LastSwiftMigration = 1000;
ProvisioningStyle = Automatic;
TestTargetID = B5CCB7AA1EFD0F2300194CFB;
};
Expand Down Expand Up @@ -537,21 +536,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 @@ -673,13 +657,15 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -713,6 +699,7 @@
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand All @@ -733,13 +720,15 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand All @@ -765,6 +754,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
Expand All @@ -790,8 +780,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
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 @@ -813,8 +802,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.magiclab.ParallaxHeader;
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 All @@ -828,7 +816,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.magiclab.ParallaxHeaderTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -841,7 +829,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.magiclab.ParallaxHeaderTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -857,8 +845,7 @@
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 @@ -874,8 +861,7 @@
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 All @@ -889,8 +875,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.magiclab.ExmpleTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Exmple.app/Exmple";
};
name = Debug;
Expand All @@ -905,8 +890,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.magiclab.ExmpleTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Exmple.app/Exmple";
};
name = Release;
Expand Down
Loading