-
-
Save richy486/bc5b158583e4ec1f831dd99f9834a7e5 to your computer and use it in GitHub Desktop.
Stuff to put in each new app project.
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
# Add a carthage Cartfile | |
github "username/Project" ~> 1.0 | |
git "https://github.com/username/Project.git" "branch" | |
# Update carthage | |
carthage update --platform ios | |
# Run script | |
/usr/local/bin/carthage copy-frameworks | |
$(SRCROOT)/Carthage/Build/iOS/[framework] | |
# Xcode <= 10 | |
# Also AppDelegate.swift didFinishLaunchingWithOptions (Swift) | |
window = UIWindow(frame: UIScreen.main.bounds) | |
if let window = window { | |
let viewController = ViewController() | |
window.rootViewController = viewController | |
window.backgroundColor = UIColor.white | |
window.makeKeyAndVisible() | |
} | |
# Xcode >= 11 (Obj-C) | |
# SceneDelegate.h | |
UIWindowScene *windowScene = (UIWindowScene*)scene; | |
if (windowScene == nil) { return; } | |
_window = [[UIWindow alloc] initWithFrame: UIScreen.mainScreen.bounds]; | |
_window.windowScene = windowScene; | |
_window.rootViewController = [[ViewController alloc] init]; | |
_window.rootViewController.view.backgroundColor = UIColor.whiteColor; | |
[_window makeKeyAndVisible]; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment