Skip to content

Commit

Permalink
use swift in all classes. Leave ViewController.m/h for legacy example
Browse files Browse the repository at this point in the history
  • Loading branch information
bvogelzang committed Jun 21, 2014
1 parent 1c5a1ed commit 243aa5e
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 109 deletions.
22 changes: 7 additions & 15 deletions SevenSwitchExample/SevenSwitchExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
objects = {

/* Begin PBXBuildFile section */
4593DA6019561AEC006EB924 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 45F7C64D176D202700AE1301 /* ViewController.m */; };
4593DA6219561C05006EB924 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4593DA6119561C05006EB924 /* AppDelegate.swift */; };
4593DA6319561C5C006EB924 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4593DA5D19560DB4006EB924 /* ViewController.swift */; };
45B6529F176E3A440006F201 /* check.png in Resources */ = {isa = PBXBuildFile; fileRef = 45B6529B176E3A440006F201 /* check.png */; };
45B652A0176E3A440006F201 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 45B6529C176E3A440006F201 /* [email protected] */; };
45B652A1176E3A440006F201 /* cross.png in Resources */ = {isa = PBXBuildFile; fileRef = 45B6529D176E3A440006F201 /* cross.png */; };
Expand All @@ -17,8 +18,6 @@
45F7C634176D202700AE1301 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 45F7C633176D202700AE1301 /* Foundation.framework */; };
45F7C636176D202700AE1301 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 45F7C635176D202700AE1301 /* CoreGraphics.framework */; };
45F7C63C176D202700AE1301 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 45F7C63A176D202700AE1301 /* InfoPlist.strings */; };
45F7C63E176D202700AE1301 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 45F7C63D176D202700AE1301 /* main.m */; };
45F7C642176D202700AE1301 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 45F7C641176D202700AE1301 /* AppDelegate.m */; };
45F7C644176D202700AE1301 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 45F7C643176D202700AE1301 /* Default.png */; };
45F7C646176D202700AE1301 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 45F7C645176D202700AE1301 /* [email protected] */; };
45F7C648176D202700AE1301 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 45F7C647176D202700AE1301 /* [email protected] */; };
Expand All @@ -27,6 +26,7 @@

/* Begin PBXFileReference section */
4593DA5D19560DB4006EB924 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
4593DA6119561C05006EB924 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
45B6529B176E3A440006F201 /* check.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = check.png; sourceTree = "<group>"; };
45B6529C176E3A440006F201 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
45B6529D176E3A440006F201 /* cross.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cross.png; sourceTree = "<group>"; };
Expand All @@ -38,10 +38,6 @@
45F7C635176D202700AE1301 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
45F7C639176D202700AE1301 /* SevenSwitchExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SevenSwitchExample-Info.plist"; sourceTree = "<group>"; };
45F7C63B176D202700AE1301 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
45F7C63D176D202700AE1301 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
45F7C63F176D202700AE1301 /* SevenSwitchExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SevenSwitchExample-Prefix.pch"; sourceTree = "<group>"; };
45F7C640176D202700AE1301 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
45F7C641176D202700AE1301 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
45F7C643176D202700AE1301 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
45F7C645176D202700AE1301 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
45F7C647176D202700AE1301 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -94,13 +90,12 @@
45F7C637176D202700AE1301 /* SevenSwitchExample */ = {
isa = PBXGroup;
children = (
45F7C640176D202700AE1301 /* AppDelegate.h */,
45F7C641176D202700AE1301 /* AppDelegate.m */,
45F7C649176D202700AE1301 /* MainStoryboard.storyboard */,
4593DA6119561C05006EB924 /* AppDelegate.swift */,
45F7C64C176D202700AE1301 /* ViewController.h */,
45F7C64D176D202700AE1301 /* ViewController.m */,
4593DA5D19560DB4006EB924 /* ViewController.swift */,
45DD2ABD1954C14B0028A5DB /* SevenSwitch.swift */,
45F7C649176D202700AE1301 /* MainStoryboard.storyboard */,
45B6529B176E3A440006F201 /* check.png */,
45B6529C176E3A440006F201 /* [email protected] */,
45B6529D176E3A440006F201 /* cross.png */,
Expand All @@ -115,8 +110,6 @@
children = (
45F7C639176D202700AE1301 /* SevenSwitchExample-Info.plist */,
45F7C63A176D202700AE1301 /* InfoPlist.strings */,
45F7C63D176D202700AE1301 /* main.m */,
45F7C63F176D202700AE1301 /* SevenSwitchExample-Prefix.pch */,
45F7C643176D202700AE1301 /* Default.png */,
45F7C645176D202700AE1301 /* [email protected] */,
45F7C647176D202700AE1301 /* [email protected] */,
Expand Down Expand Up @@ -195,9 +188,8 @@
buildActionMask = 2147483647;
files = (
45DD2ABE1954C14B0028A5DB /* SevenSwitch.swift in Sources */,
45F7C63E176D202700AE1301 /* main.m in Sources */,
45F7C642176D202700AE1301 /* AppDelegate.m in Sources */,
4593DA6019561AEC006EB924 /* ViewController.m in Sources */,
4593DA6319561C5C006EB924 /* ViewController.swift in Sources */,
4593DA6219561C05006EB924 /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
15 changes: 0 additions & 15 deletions SevenSwitchExample/SevenSwitchExample/AppDelegate.h

This file was deleted.

46 changes: 0 additions & 46 deletions SevenSwitchExample/SevenSwitchExample/AppDelegate.m

This file was deleted.

45 changes: 45 additions & 0 deletions SevenSwitchExample/SevenSwitchExample/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
//
// AppDelegate.swift
// SevenSwitchExample
//
// Created by Benjamin Vogelzang on 6/21/14.
// Copyright (c) 2014 Ben Vogelzang. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
// Override point for customization after application launch.
return true
}

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) {
// 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) {
// 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) {
// 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) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}


}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="6154.17" systemVersion="13D65" targetRuntime="iOS.CocoaTouch" variant="6xAndEarlier" propertyAccessControl="none" useAutolayout="YES" promptedForUpgradeToXcode5="NO" initialViewController="2">
<dependencies>
<deployment defaultVersion="1552" identifier="iOS"/>
<development version="4600" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6153.11"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="5">
<objects>
<viewController id="2" customClass="ViewController" sceneMemberID="viewController">
<viewController id="2" customClass="ViewController" customModule="SevenSwitchExample" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="3">
<rect key="frame" x="0.0" y="20" width="320" height="548"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
Expand Down
18 changes: 0 additions & 18 deletions SevenSwitchExample/SevenSwitchExample/main.m

This file was deleted.

0 comments on commit 243aa5e

Please sign in to comment.