Skip to content

Commit

Permalink
Updating to Swift5
Browse files Browse the repository at this point in the history
  • Loading branch information
Clément DEUST committed Mar 27, 2019
1 parent 4dc6542 commit 0cce1ad
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 22 deletions.
9 changes: 7 additions & 2 deletions Bolts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@
8E9C3CE117DE9DE000427E62 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0820;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "Parse Inc.";
TargetAttributes = {
8E8C8F1817F241DA00E3F1C7 = {
Expand All @@ -979,10 +979,11 @@
};
buildConfigurationList = 8E9C3CE417DE9DE000427E62 /* Build configuration list for PBXProject "Bolts" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 8E9C3CE017DE9DE000427E62;
productRefGroup = 8E9C3CEA17DE9DE000427E62 /* Products */;
Expand Down Expand Up @@ -1402,13 +1403,17 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 81D646FA1D2CA0E000690609 /* Debug.xcconfig */;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
};
name = Debug;
};
8E9C3D0D17DE9DE000427E62 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 81D646FB1D2CA0E000690609 /* Release.xcconfig */;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
};
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>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
6 changes: 3 additions & 3 deletions Bolts.xcodeproj/xcshareddata/xcschemes/Bolts-iOS.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -40,8 +40,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
codeCoverageEnabled = "YES"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
6 changes: 3 additions & 3 deletions Bolts.xcodeproj/xcshareddata/xcschemes/Bolts-tvOS.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -40,8 +40,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
codeCoverageEnabled = "YES"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
6 changes: 3 additions & 3 deletions Bolts.xcodeproj/xcshareddata/xcschemes/Bolts-watchOS.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,8 +26,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
codeCoverageEnabled = "YES"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
Expand Down
14 changes: 7 additions & 7 deletions Bolts/iOS/BFAppLinkReturnToRefererController.m
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ - (void)statusBarFrameWillChange:(NSNotification *)notification {
if (CGRectGetHeight(newFrame) == 40) {
UIViewAnimationOptions options = UIViewAnimationOptionBeginFromCurrentState;
[UIView animateWithDuration:kBFViewAnimationDuration delay:0.0 options:options animations:^{
_view.frame = CGRectMake(0.0, 0.0, CGRectGetWidth(_view.bounds), 0.0);
self->_view.frame = CGRectMake(0.0, 0.0, CGRectGetWidth(_view.bounds), 0.0);
} completion:nil];
}
}
Expand All @@ -145,7 +145,7 @@ - (void)statusBarFrameDidChange:(NSNotification *)notification {
if (CGRectGetHeight(newFrame) == 40) {
UIViewAnimationOptions options = UIViewAnimationOptionBeginFromCurrentState;
[UIView animateWithDuration:kBFViewAnimationDuration delay:0.0 options:options animations:^{
[_view sizeToFit];
[self->_view sizeToFit];
[self moveNavigationBar];
} completion:nil];
}
Expand Down Expand Up @@ -186,21 +186,21 @@ - (void)closeViewAnimated:(BOOL)animated {

- (void)closeViewAnimated:(BOOL)animated explicitlyClosed:(BOOL)explicitlyClosed {
void (^closer)(void) = ^{
if (_navigationController) {
[self updateNavigationBarY:_view.statusBarHeight];
if (self->_navigationController) {
[self updateNavigationBarY:self->_view.statusBarHeight];
}

CGRect frame = _view.frame;
CGRect frame = self->_view.frame;
frame.size.height = 0.0;
_view.frame = frame;
self->_view.frame = frame;
};

if (animated) {
[UIView animateWithDuration:kBFViewAnimationDuration animations:^{
closer();
} completion:^(BOOL finished) {
if (explicitlyClosed) {
_view.closed = YES;
self->_view.closed = YES;
}
}];
} else {
Expand Down

0 comments on commit 0cce1ad

Please sign in to comment.