Give YogaKitSample some love, Convert it to a Swift Project
Summary: To date, our sample project was lacking. There is still a lot of work that can be done to improve, but, this is a step in the right direction. Here are the changes in this commit: 1. The project is written in Swift. 2. Created new CollectionView (via [IGListKit](https://github.com/instagram/iglistkit)), making it very easy to add new examples. 3. New examples for basic layouts, and including/excluding layouts on the fly. Here's a video!  Closes https://github.com/facebook/yoga/pull/392 Reviewed By: emilsjolander Differential Revision: D4550379 Pulled By: dshahidehpour fbshipit-source-id: 64a07acf96c1887f1d2ad0c54971fcedb64334a0
This commit is contained in:
committed by
Facebook Github Bot
parent
ad8c6225fd
commit
058761e16e
27
YogaKit/YogaKitSample/YogaKitSample/AppDelegate.swift
Normal file
27
YogaKit/YogaKitSample/YogaKitSample/AppDelegate.swift
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Copyright 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE-examples file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
@UIApplicationMain
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
var window: UIWindow?
|
||||
|
||||
func applicationDidFinishLaunching(_ application: UIApplication) {
|
||||
self.window = UIWindow(frame: UIScreen.main.bounds)
|
||||
if let window = self.window {
|
||||
let navigationController = UINavigationController(rootViewController: ExamplesViewController())
|
||||
navigationController.navigationBar.isTranslucent = false
|
||||
|
||||
window.rootViewController = navigationController
|
||||
window.backgroundColor = .white
|
||||
window.makeKeyAndVisible()
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user