This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gemfile: | |
# | |
# source 'https://rubygems.org' | |
# | |
# gem 'xcodeproj' | |
require 'xcodeproj' | |
project_path = 'Your.xcodeproj' | |
project = Xcodeproj::Project.open(project_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension UIColor { | |
@objc | |
class func systemIndigo(or substitute: UIColor) -> UIColor { | |
if #available(iOS 13, *) { | |
return .systemIndigo | |
} else { | |
return substitute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ $SDK_VERSION_MAJOR -ge 130000 ]; then | |
CONDITIONS="AVAILABLE_iOS_13 \$(inherited)" | |
else | |
CONDITIONS="\$(inherited)" | |
fi | |
cat <<_EOT_ > "$PROJECT_DIR/Generated/Custom.xcconfig" | |
SWIFT_ACTIVE_COMPILATION_CONDITIONS=$CONDITIONS | |
_EOT_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)viewWillAppear:(BOOL)animated | |
{ | |
[super viewWillAppear:animated]; | |
[self.transitionCoordinator animateAlongsideTransition:nil completion:^(id<UIViewControllerTransitionCoordinatorContext> context) { | |
if ( [context initiallyInteractive] ) return; | |
[self _onTransitionEnd:context]; | |
}]; | |
[self.transitionCoordinator notifyWhenInteractionEndsUsingBlock:^(id<UIViewControllerTransitionCoordinatorContext> context) { | |
[self _onTransitionEnd:context]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Script to convert a Xcode3 Color theme into a Xcode4 one. | |
Example: | |
bash# python xcode3_theme_to_xcode4.py Twilight.xcolortheme | |
It will write a new file: Twilight.dvtcolortheme into the same folder as the script is residing in. | |
""" | |
import plistlib,sys | |
""" Define boilerplate of the color theme """ | |
defaultConfig = { |