Skip to content
Permalink
Browse files

All sources converted to Swift3 with automatic converter

  • Loading branch information...
alexgarbarev committed Nov 27, 2016
1 parent 977d88a commit 8733d140cfb9f1d15ebb2d8f25a41a74913b73ec
@@ -3729,15 +3729,18 @@
};
90ABC3E91A36B09E008D8162 = {
CreatedOnToolsVersion = 6.1.1;
LastSwiftMigration = 0810;
};
90ABC3F31A36B09E008D8162 = {
CreatedOnToolsVersion = 6.1.1;
};
90ABC4BA1A36BA53008D8162 = {
CreatedOnToolsVersion = 6.1.1;
LastSwiftMigration = 0810;
};
90ABC4CE1A36BA53008D8162 = {
CreatedOnToolsVersion = 6.1.1;
LastSwiftMigration = 0810;
TestTargetID = 90ABC4BA1A36BA53008D8162;
};
BB7F97561CA6EE67003B3E1F = {
@@ -5207,6 +5210,7 @@
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
@@ -5233,6 +5237,7 @@
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
@@ -5295,6 +5300,7 @@
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
@@ -5310,6 +5316,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Release;
};
@@ -5332,6 +5339,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TyphoonFrameworkSwiftExample.app/TyphoonFrameworkSwiftExample";
};
name = Debug;
@@ -5351,6 +5359,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TyphoonFrameworkSwiftExample.app/TyphoonFrameworkSwiftExample";
};
name = Release;
@@ -17,30 +17,30 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}

func applicationWillResignActive(application: UIApplication) {
func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

func applicationDidEnterBackground(application: UIApplication) {
func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

func applicationWillEnterForeground(application: UIApplication) {
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

func applicationDidBecomeActive(application: UIApplication) {
func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

func applicationWillTerminate(application: UIApplication) {
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

@@ -12,11 +12,11 @@
import Foundation
import Typhoon

public class Assembly: TyphoonAssembly {
open class Assembly: TyphoonAssembly {

public dynamic func viewController() -> AnyObject {
open dynamic func viewController() -> AnyObject {
return TyphoonDefinition.withClass(ViewController.self) { definition in
definition.injectProperty("foo", with: "bar")
}
definition!.injectProperty("foo", with: "bar")
} as AnyObject
}
}
}
@@ -11,17 +11,17 @@
import UIKit

public class ViewController: UIViewController {
open class ViewController: UIViewController {

public var foo: String?
open var foo: String?

public override func viewDidLoad() {
open override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
print("Worked! \(foo)")
}

public override func didReceiveMemoryWarning() {
open override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@@ -22,8 +22,8 @@ class TyphoonFrameworkSwiftExampleTests: XCTestCase {
Assembly()
])

let storyboard = TyphoonStoryboard(name: "Main", factory: factory, bundle: NSBundle.mainBundle())
let controller = storyboard.instantiateViewControllerWithIdentifier("viewController") as! ViewController
let storyboard = TyphoonStoryboard(name: "Main", factory: factory, bundle: Bundle.main)
let controller = storyboard?.instantiateViewController(withIdentifier: "viewController") as! ViewController

XCTAssertEqual(controller.foo!, "bar", "injected foo should equal bar")
}

0 comments on commit 8733d14

Please sign in to comment.
You can’t perform that action at this time.