├── .gitignore ├── 616Playground.playground ├── contents.xcplayground ├── section-1.swift └── timeline.xctimeline ├── ActionSheetApp ├── ActionSheetApp.xcodeproj │ └── project.pbxproj ├── ActionSheetApp │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── ActionSheetAppTests │ ├── ActionSheetAppTests.swift │ └── Info.plist ├── BlueCentralApp ├── BlueCentralApp.xcodeproj │ └── project.pbxproj ├── BlueCentralApp │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── BlueCentralAppTests │ ├── BlueCentralAppTests.swift │ └── Info.plist ├── ButtonApp ├── ButtonApp.xcodeproj │ └── project.pbxproj ├── ButtonApp │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── ButtonApp-Bridging-Header.h │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ ├── OCClass.h │ ├── OCClass.m │ └── ViewController.swift └── ButtonAppTests │ ├── ButtonAppTests.swift │ └── Info.plist ├── CProgram ├── array ├── array.c ├── condition ├── condition.c ├── enum ├── enum.c ├── func ├── func.c ├── switch └── switch.c ├── ChannelApp ├── ChannelApp.xcodeproj │ └── project.pbxproj ├── ChannelApp │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── ChannelAppTests │ ├── ChannelAppTests.swift │ └── Info.plist ├── Class.playground ├── contents.xcplayground ├── section-1.swift └── timeline.xctimeline ├── ClassApp ├── ClassApp.xcodeproj │ └── project.pbxproj ├── ClassApp │ ├── Animal.swift │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Dog.swift │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ ├── Monkey.swift │ └── ViewController.swift └── ClassAppTests │ ├── ClassAppTests.swift │ └── Info.plist ├── Closure.playground ├── contents.xcplayground ├── section-1.swift └── timeline.xctimeline ├── ClosureApp ├── ClosureApp.xcodeproj │ └── project.pbxproj ├── ClosureApp │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── ClosureAppTests │ ├── ClosureAppTests.swift │ └── Info.plist ├── Coder.playground ├── contents.xcplayground ├── section-1.swift └── timeline.xctimeline ├── CoderApp ├── CoderApp.xcodeproj │ └── project.pbxproj ├── CoderApp │ ├── AppDelegate.swift │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ └── Info.plist └── CoderAppTests │ ├── CoderAppTests.swift │ └── Info.plist ├── Condition.playground ├── contents.xcplayground ├── section-1.swift └── timeline.xctimeline ├── DVIPlayer ├── DVIPlayer.xcodeproj │ └── project.pbxproj ├── DVIPlayer │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Channel.swift │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ ├── OfflineTableViewController.swift │ ├── OfflineViewController.swift │ ├── OnlineTableViewController.swift │ ├── OnlineViewController.swift │ ├── Song.swift │ └── ViewController.swift └── DVIPlayerTests │ ├── DVIPlayerTests.swift │ └── Info.plist ├── DeinitApp ├── DeinitApp.xcodeproj │ └── project.pbxproj ├── DeinitApp │ ├── Animal.swift │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Dog.swift │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ ├── ViewController.swift │ └── YellowDog.swift └── DeinitAppTests │ ├── DeinitAppTests.swift │ └── Info.plist ├── DownloadApp ├── DownloadApp.xcodeproj │ └── project.pbxproj ├── DownloadApp │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── DownloadAppTests │ ├── DownloadAppTests.swift │ └── Info.plist ├── Extension.playground ├── contents.xcplayground ├── section-1.swift └── timeline.xctimeline ├── ExtensionApp ├── ExtensionApp.xcodeproj │ └── project.pbxproj ├── ExtensionApp │ ├── Animal+food.swift │ ├── Animal+play.swift │ ├── Animal.swift │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ ├── String+print.swift │ └── ViewController.swift └── ExtensionAppTests │ ├── ExtensionAppTests.swift │ └── Info.plist ├── FileApp ├── FileApp.xcodeproj │ └── project.pbxproj ├── FileApp │ ├── 1.jpg │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── FileAppTests │ ├── FileAppTests.swift │ └── Info.plist ├── FileManagerApp ├── FileManagerApp.xcodeproj │ └── project.pbxproj ├── FileManagerApp │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── FileManagerAppTests │ ├── FileManagerAppTests.swift │ └── Info.plist ├── FlowControl.playground ├── contents.xcplayground ├── section-1.swift └── timeline.xctimeline ├── FlowControl2.playground ├── contents.xcplayground ├── section-1.swift └── timeline.xctimeline ├── JsonPlayground.playground ├── contents.xcplayground ├── section-1.swift └── timeline.xctimeline ├── Jump.playground ├── contents.xcplayground ├── section-1.swift └── timeline.xctimeline ├── LoginApp ├── LoginApp.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ └── cheetah.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── LoginApp │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── LoginAppTests │ ├── Info.plist │ └── LoginAppTests.swift ├── MyPlayground.playground ├── contents.xcplayground ├── section-1.swift └── timeline.xctimeline ├── NavApp1 ├── NavApp1.xcodeproj │ └── project.pbxproj ├── NavApp1 │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ ├── SecondViewController.swift │ └── ViewController.swift └── NavApp1Tests │ ├── Info.plist │ └── NavApp1Tests.swift ├── NetworkApp ├── NetworkApp.xcodeproj │ └── project.pbxproj ├── NetworkApp │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── NetworkAppTests │ ├── Info.plist │ └── NetworkAppTests.swift ├── NoteApp ├── NoteApp.xcodeproj │ └── project.pbxproj ├── NoteApp │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── NoteAppTests │ ├── Info.plist │ └── NoteAppTests.swift ├── NoteApp4 ├── NoteApp4.xcodeproj │ └── project.pbxproj ├── NoteApp4 │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── DetailViewController.swift │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ └── MasterViewController.swift └── NoteApp4Tests │ ├── Info.plist │ └── NoteApp4Tests.swift ├── Operator.playground ├── contents.xcplayground ├── section-1.swift └── timeline.xctimeline ├── Optional.playground ├── contents.xcplayground ├── section-1.swift └── timeline.xctimeline ├── Protocol.playground ├── contents.xcplayground ├── section-1.swift └── timeline.xctimeline ├── README.md ├── ScoreApp ├── ScoreApp.xcodeproj │ └── project.pbxproj ├── ScoreApp │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Delete.imageset │ │ │ ├── Contents.json │ │ │ └── Delete.png │ │ ├── LaunchImage.launchimage │ │ │ └── Contents.json │ │ ├── keditbookmarks.imageset │ │ │ ├── Contents.json │ │ │ └── keditbookmarks.png │ │ └── right.imageset │ │ │ ├── Contents.json │ │ │ └── right.png │ ├── Info.plist │ └── ViewController.swift └── ScoreAppTests │ ├── Info.plist │ └── ScoreAppTests.swift ├── SimplePlayer ├── SimplePlayer.xcodeproj │ └── project.pbxproj ├── SimplePlayer │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── SimplePlayerTests │ ├── Info.plist │ └── SimplePlayerTests.swift ├── SoccerTV ├── Podfile ├── Podfile.lock ├── Pods │ ├── BuildHeaders │ │ └── JSONKit │ │ │ └── JSONKit.h │ ├── Headers │ │ └── JSONKit │ │ │ └── JSONKit.h │ ├── JSONKit │ │ ├── JSONKit.h │ │ ├── JSONKit.m │ │ └── README.md │ ├── Manifest.lock │ ├── Pods-JSONKit-Private.xcconfig │ ├── Pods-JSONKit-dummy.m │ ├── Pods-JSONKit-prefix.pch │ ├── Pods-JSONKit.xcconfig │ ├── Pods-acknowledgements.markdown │ ├── Pods-acknowledgements.plist │ ├── Pods-dummy.m │ ├── Pods-environment.h │ ├── Pods-resources.sh │ ├── Pods.xcconfig │ └── Pods.xcodeproj │ │ └── project.pbxproj ├── SoccerTV.xcodeproj │ └── project.pbxproj ├── SoccerTV │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── ChannelModel.h │ ├── ChannelModel.mm │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ ├── SoccerTV-Bridging-Header.h │ └── ViewController.swift └── SoccerTVTests │ ├── Info.plist │ └── SoccerTVTests.swift ├── SoccerTV5 ├── SoccerTV5.xcodeproj │ └── project.pbxproj ├── SoccerTV5 │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── DVIChannel.h │ ├── DVIChannel.m │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ ├── SoccerTV5-Bridging-Header.h │ ├── ViewController.swift │ └── main.swift └── SoccerTV5Tests │ ├── Info.plist │ └── SoccerTV5Tests.swift ├── SwiftApp_1 ├── SwiftApp_1.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── cheetah.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── cheetah.xcuserdatad │ │ └── xcschemes │ │ ├── SwiftApp_1.xcscheme │ │ └── xcschememanagement.plist ├── SwiftApp_1 │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ ├── SecondViewController.swift │ └── ViewController.swift └── SwiftApp_1Tests │ ├── Info.plist │ └── SwiftApp_1Tests.swift ├── SwiftApp_2 ├── SwiftApp_2.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── cheetah.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── cheetah.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── SwiftApp_2.xcscheme │ │ └── xcschememanagement.plist ├── SwiftApp_2 │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ ├── Singleton.swift │ ├── Student.h │ ├── Student.m │ ├── SwiftApp_2-Bridging-Header.h │ └── ViewController.swift └── SwiftApp_2Tests │ ├── Info.plist │ └── SwiftApp_2Tests.swift ├── SwiftApp_3 ├── SwiftApp_3.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── cheetah.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── cheetah.xcuserdatad │ │ └── xcschemes │ │ ├── SwiftApp_3.xcscheme │ │ └── xcschememanagement.plist ├── SwiftApp_3 │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── SwiftApp_3Tests │ ├── Info.plist │ └── SwiftApp_3Tests.swift ├── SwiftNote ├── SwiftNote.xcodeproj │ └── project.pbxproj ├── SwiftNote │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── SwiftNoteTests │ ├── Info.plist │ └── SwiftNoteTests.swift ├── SwiftOCTest ├── SwiftOCTest.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── cheetah.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── cheetah.xcuserdatad │ │ └── xcschemes │ │ └── SwiftOCTest.xcscheme ├── SwiftOCTest │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ ├── OCViewController.h │ ├── OCViewController.m │ ├── SwiftOCTest-Bridging-Header.h │ └── ViewController.swift └── SwiftOCTestTests │ ├── Info.plist │ └── SwiftOCTestTests.swift ├── Tree.playground ├── contents.xcplayground ├── section-1.swift └── timeline.xctimeline ├── TreeGraph ├── TreeGraph.xcodeproj │ └── project.pbxproj ├── TreeGraph │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── TreeGraphTests │ ├── Info.plist │ └── TreeGraphTests.swift ├── ViewApp ├── ViewApp.xcodeproj │ └── project.pbxproj ├── ViewApp │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── ViewAppTests │ ├── Info.plist │ └── ViewAppTests.swift ├── ViewApp2 ├── ViewApp2.xcodeproj │ └── project.pbxproj ├── ViewApp2 │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── ViewApp2Tests │ ├── Info.plist │ └── ViewApp2Tests.swift ├── WebApp ├── WebApp.xcodeproj │ └── project.pbxproj ├── WebApp │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── WebAppTests │ ├── Info.plist │ └── WebAppTests.swift ├── WorldCupTV ├── WorldCupTV.xcodeproj │ └── project.pbxproj ├── WorldCupTV │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Channel.h │ ├── Channel.mm │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ ├── ViewController.swift │ └── WorldCupTV-Bridging-Header.h └── WorldCupTVTests │ ├── Info.plist │ └── WorldCupTVTests.swift ├── enum.playground ├── contents.xcplayground ├── section-1.swift └── timeline.xctimeline ├── iOS_Playground.playground ├── contents.xcplayground ├── section-1.swift └── timeline.xctimeline ├── 时间安排.playground ├── Results.playgrounddata ├── contents.xcplayground ├── section-1.swift └── timeline.xctimeline ├── 签到 ├── 签到.xcodeproj │ └── project.pbxproj ├── 签到 │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── 签到Tests │ ├── Info.plist │ └── __Tests.swift └── 网络播放器.pages ├── Data ├── Hardcover_bullet_black-13.png ├── pasted-image-15.tif ├── pasted-image-17.tif ├── pasted-image-19.tif ├── pasted-image-21.tif ├── pasted-image-23.tif ├── pasted-image-small-16.png ├── pasted-image-small-18.png ├── pasted-image-small-20.png ├── pasted-image-small-22.png └── pasted-image-small-24.png ├── Index.zip ├── Metadata ├── BuildVersionHistory.plist ├── DocumentIdentifier └── Properties.plist ├── preview-micro.jpg ├── preview-web.jpg └── preview.jpg /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | xcuserdata* 3 | *~ 4 | *.xcworkspace 5 | -------------------------------------------------------------------------------- /616Playground.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /616Playground.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ActionSheetApp/ActionSheetApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ActionSheetApp/ActionSheetApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ActionSheetApp/ActionSheetApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /ActionSheetApp/ActionSheetAppTests/ActionSheetAppTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ActionSheetAppTests.swift 3 | // ActionSheetAppTests 4 | // 5 | // Created by WuQiong on 6/24/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class ActionSheetAppTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /ActionSheetApp/ActionSheetAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /BlueCentralApp/BlueCentralApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /BlueCentralApp/BlueCentralApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /BlueCentralApp/BlueCentralApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /BlueCentralApp/BlueCentralAppTests/BlueCentralAppTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BlueCentralAppTests.swift 3 | // BlueCentralAppTests 4 | // 5 | // Created by WuQiong on 6/25/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class BlueCentralAppTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /BlueCentralApp/BlueCentralAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ButtonApp/ButtonApp/ButtonApp-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | -------------------------------------------------------------------------------- /ButtonApp/ButtonApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ButtonApp/ButtonApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ButtonApp/ButtonApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /ButtonApp/ButtonApp/OCClass.h: -------------------------------------------------------------------------------- 1 | // 2 | // OCClass.h 3 | // ButtonApp 4 | // 5 | // Created by WuQiong on 6/14/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface OCClass : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ButtonApp/ButtonApp/OCClass.m: -------------------------------------------------------------------------------- 1 | // 2 | // OCClass.m 3 | // ButtonApp 4 | // 5 | // Created by WuQiong on 6/14/14. 6 | // Copyright (c) 2014 xxxx. All rights reserved. 7 | // 8 | 9 | #import "OCClass.h" 10 | 11 | #import 12 | 13 | @implementation OCClass 14 | 15 | - (instancetype)initWithFrame:(CGRect)frame 16 | { 17 | self = [super initWithFrame:frame]; 18 | if (self) { 19 | [[NSBundle mainBundle] loadNibNamed:@"xxxx" owner:self options:nil]; 20 | } 21 | return self; 22 | } 23 | 24 | /* 25 | // Only override drawRect: if you perform custom drawing. 26 | // An empty implementation adversely affects performance during animation. 27 | - (void)drawRect:(CGRect)rect 28 | { 29 | // Drawing code 30 | } 31 | */ 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /ButtonApp/ButtonAppTests/ButtonAppTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ButtonAppTests.swift 3 | // ButtonAppTests 4 | // 5 | // Created by WuQiong on 6/13/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class ButtonAppTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /ButtonApp/ButtonAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /CProgram/array: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/CProgram/array -------------------------------------------------------------------------------- /CProgram/array.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char const *argv[]) 4 | { 5 | int array[4] = {1, 2, 3, 4}; 6 | for (int i = 0; i < 4; ++i) 7 | { 8 | printf("%d: %d\n", i, array[i]); 9 | } 10 | 11 | return 0; 12 | } -------------------------------------------------------------------------------- /CProgram/condition: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/CProgram/condition -------------------------------------------------------------------------------- /CProgram/condition.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef enum 4 | { 5 | Mon = 10, 6 | Tue, 7 | Wed, 8 | Thu, 9 | Fri, 10 | Sat, 11 | Sun 12 | } Weekday; 13 | 14 | int main(int argc, char const *argv[]) 15 | { 16 | Weekday day = Mon; 17 | switch (day) { 18 | case Mon: 19 | printf("苦逼的去上班!\n"); 20 | // break; 21 | case Sat: 22 | printf("高兴的出去玩! \n"); 23 | break; 24 | default: 25 | printf("打酱油! \n"); 26 | } 27 | 28 | printf("Success!\n"); 29 | return 0; 30 | } -------------------------------------------------------------------------------- /CProgram/enum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/CProgram/enum -------------------------------------------------------------------------------- /CProgram/enum.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | enum Week 4 | { 5 | Mon = 10, Tue, Wed = 30, Thu, Fri = 90, Sat, Sun 6 | }; 7 | 8 | int main(int argc, char const *argv[]) 9 | { 10 | printf("%d, %d\n", Mon, Sun); 11 | return 0; 12 | } -------------------------------------------------------------------------------- /CProgram/func: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/CProgram/func -------------------------------------------------------------------------------- /CProgram/func.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int func(int a) 4 | { 5 | printf("hello, world: %d\n", a); 6 | 7 | return 400 + a; 8 | } 9 | 10 | int main(int argc, char const *argv[]) 11 | { 12 | int result = 400 + 100; 13 | printf("result: %d\n", result); 14 | 15 | result = 400 + 100; 16 | printf("result: %d\n", result); 17 | 18 | return 0; 19 | } -------------------------------------------------------------------------------- /CProgram/switch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/CProgram/switch -------------------------------------------------------------------------------- /CProgram/switch.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char const *argv[]) 4 | { 5 | int a = 100; 6 | 7 | for (int i = 0; i < 100; ++i) 8 | { 9 | printf("for: %d\n", i); 10 | } 11 | 12 | do { 13 | printf("do-while: %d\n", a); 14 | a++; 15 | } while(a < 100); 16 | 17 | a = 100; 18 | while(a < 100) { 19 | printf("while: %d\n", a); 20 | a++; 21 | } 22 | 23 | return 0; 24 | } -------------------------------------------------------------------------------- /ChannelApp/ChannelApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChannelApp/ChannelApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChannelApp/ChannelApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /ChannelApp/ChannelAppTests/ChannelAppTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChannelAppTests.swift 3 | // ChannelAppTests 4 | // 5 | // Created by WuQiong on 6/16/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class ChannelAppTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /ChannelApp/ChannelAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Class.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Class.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ClassApp/ClassApp/Animal.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Animal.swift 3 | // ClassApp 4 | // 5 | // Created by WuQiong on 6/12/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | //继承 11 | class Animal: NSObject { 12 | //属性 13 | var weight: Double = 0 14 | var age: Int = 0 15 | 16 | //initializer 17 | init(weight: Double, age: Int) { 18 | super.init() 19 | 20 | self.weight = weight 21 | self.age = age 22 | } 23 | 24 | //method 25 | func eat(something: Double, something2: Double) -> Double { 26 | weight = weight + something - something2 27 | println("weight: \(weight)") 28 | 29 | return weight 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ClassApp/ClassApp/Dog.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Dog.swift 3 | // ClassApp 4 | // 5 | // Created by WuQiong on 6/12/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class Dog: Animal { 12 | init() { 13 | super.init(weight: 10, age: 1) 14 | } 15 | 16 | //类方法 17 | class func printx() { 18 | println("Dog printx") 19 | } 20 | 21 | class func printy() { 22 | println("Dog printy") 23 | 24 | printx() 25 | } 26 | 27 | //实例方法 28 | func run(speed: Double) { 29 | println("run with speed: \(speed)") 30 | 31 | eat(40, something2: 53) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ClassApp/ClassApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ClassApp/ClassApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ClassApp/ClassApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /ClassApp/ClassApp/Monkey.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Monkey.swift 3 | // ClassApp 4 | // 5 | // Created by WuQiong on 6/12/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class Monkey: Animal { 12 | func climbTree() { 13 | println("Monkey climb tree") 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ClassApp/ClassAppTests/ClassAppTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ClassAppTests.swift 3 | // ClassAppTests 4 | // 5 | // Created by WuQiong on 6/12/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class ClassAppTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /ClassApp/ClassAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Closure.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Closure.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ClosureApp/ClosureApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ClosureApp/ClosureApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ClosureApp/ClosureApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /ClosureApp/ClosureAppTests/ClosureAppTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ClosureAppTests.swift 3 | // ClosureAppTests 4 | // 5 | // Created by WuQiong on 6/17/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class ClosureAppTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /ClosureApp/ClosureAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Coder.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Coder.playground/section-1.swift: -------------------------------------------------------------------------------- 1 | // Playground - noun: a place where people can play 2 | 3 | import Cocoa 4 | 5 | class Student : NSObject, NSCoding { 6 | var age: CInt = 0 7 | var name: NSString = "" 8 | 9 | func encodeWithCoder(aCoder: NSCoder!) { 10 | aCoder.encodeInt(age, forKey: "age") 11 | aCoder.encodeObject(name, forKey: "name") 12 | } 13 | 14 | init(coder aDecoder: NSCoder!) { 15 | self.age = aDecoder.decodeIntForKey("age") 16 | self.name = aDecoder.decodeObjectForKey("name") as NSString 17 | } 18 | 19 | init() { 20 | 21 | } 22 | } 23 | 24 | var stu = Student() 25 | stu.age = 20 26 | stu.name = "Zhangsan" 27 | 28 | NSKeyedArchiver.archiveRootObject(stu, toFile: "/Users/cheetah/Desktop/test.plist") 29 | var stu2 : Student = NSKeyedUnarchiver.unarchiveObjectWithFile("/Users/cheetah/Desktop/test.plist") as Student 30 | stu2.age 31 | stu2.name 32 | 33 | 34 | println("\(stu2)") 35 | -------------------------------------------------------------------------------- /Coder.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /CoderApp/CoderApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /CoderApp/CoderApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /CoderApp/CoderApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIRequiredDeviceCapabilities 26 | 27 | armv7 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /CoderApp/CoderAppTests/CoderAppTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CoderAppTests.swift 3 | // CoderAppTests 4 | // 5 | // Created by WuQiong on 6/26/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class CoderAppTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /CoderApp/CoderAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Condition.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Condition.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /DVIPlayer/DVIPlayer/Channel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Channel.swift 3 | // DVIPlayer 4 | // 5 | // Created by WuQiong on 6/26/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class Channel: NSObject { 12 | var id: NSString! 13 | var title: NSString! 14 | var cate_id: NSString! 15 | var cate: NSString! 16 | 17 | init(dict: NSDictionary) { 18 | super.init() 19 | 20 | self.id = dict["id"] as NSString 21 | self.title = dict["title"] as NSString 22 | self.cate_id = dict["cate_id"] as NSString 23 | self.cate = dict["cate"] as NSString 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /DVIPlayer/DVIPlayer/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DVIPlayer/DVIPlayer/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DVIPlayer/DVIPlayer/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /DVIPlayer/DVIPlayer/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // DVIPlayer 4 | // 5 | // Created by WuQiong on 6/26/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | @IBOutlet var bgImageView: UIImageView 13 | @IBOutlet var promptLabel: UILabel 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | println("ViewController") 19 | } 20 | 21 | override func didReceiveMemoryWarning() { 22 | super.didReceiveMemoryWarning() 23 | // Dispose of any resources that can be recreated. 24 | } 25 | 26 | 27 | } 28 | 29 | -------------------------------------------------------------------------------- /DVIPlayer/DVIPlayerTests/DVIPlayerTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DVIPlayerTests.swift 3 | // DVIPlayerTests 4 | // 5 | // Created by WuQiong on 6/26/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class DVIPlayerTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /DVIPlayer/DVIPlayerTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /DeinitApp/DeinitApp/Animal.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Animal.swift 3 | // DeinitApp 4 | // 5 | // Created by WuQiong on 6/18/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | class Animal { 12 | var weight = 0.0 13 | 14 | // 初始化方法,构造函数 15 | init(w: Double) { 16 | self.weight = w 17 | } 18 | 19 | //析构函数 20 | deinit { 21 | println("in deinit: \(weight)") 22 | } 23 | } -------------------------------------------------------------------------------- /DeinitApp/DeinitApp/Dog.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Dog.swift 3 | // DeinitApp 4 | // 5 | // Created by WuQiong on 6/18/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | class Dog : Animal { 12 | //先调用子类的析构函数,然后自动调用父类的析构函数 13 | deinit { 14 | println("Dog deinit") 15 | } 16 | } -------------------------------------------------------------------------------- /DeinitApp/DeinitApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DeinitApp/DeinitApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DeinitApp/DeinitApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /DeinitApp/DeinitApp/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // DeinitApp 4 | // 5 | // Created by WuQiong on 6/18/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | var ani4: Animal! 13 | 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | 17 | var ani3: Animal 18 | 19 | if true { 20 | //ani1引用一个Animal的对象 21 | var ani1: Animal = Animal(w: 200) 22 | //ani2引用ani1所引用的对象 23 | var ani2 = ani1 24 | 25 | ani3 = ani1 26 | 27 | ani4 = ani3 28 | } 29 | 30 | println("xxxxx") 31 | } 32 | 33 | override func didReceiveMemoryWarning() { 34 | super.didReceiveMemoryWarning() 35 | // Dispose of any resources that can be recreated. 36 | } 37 | 38 | @IBAction func didClicked(sender : AnyObject) { 39 | // ani4 = Animal(w: 40) 40 | 41 | var dog = YellowDog(w: 20) 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /DeinitApp/DeinitApp/YellowDog.swift: -------------------------------------------------------------------------------- 1 | // 2 | // YellowDog.swift 3 | // DeinitApp 4 | // 5 | // Created by WuQiong on 6/18/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | class YellowDog : Dog { 12 | deinit { 13 | println("Yellow Dog") 14 | } 15 | } -------------------------------------------------------------------------------- /DeinitApp/DeinitAppTests/DeinitAppTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeinitAppTests.swift 3 | // DeinitAppTests 4 | // 5 | // Created by WuQiong on 6/18/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class DeinitAppTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /DeinitApp/DeinitAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /DownloadApp/DownloadApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DownloadApp/DownloadApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DownloadApp/DownloadApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /DownloadApp/DownloadAppTests/DownloadAppTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DownloadAppTests.swift 3 | // DownloadAppTests 4 | // 5 | // Created by WuQiong on 6/24/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class DownloadAppTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /DownloadApp/DownloadAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Extension.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Extension.playground/section-1.swift: -------------------------------------------------------------------------------- 1 | // Playground - noun: a place where people can play 2 | 3 | import Cocoa 4 | 5 | class Animal { 6 | func run(speed: Double) { 7 | println("Animal run...") 8 | } 9 | } 10 | 11 | var ani1 = Animal() 12 | ani1.run(100) 13 | 14 | extension Animal { 15 | func jump(height: Double) { 16 | println("Animal jump...") 17 | } 18 | } 19 | 20 | ani1.jump(30) 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Extension.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ExtensionApp/ExtensionApp/Animal+food.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Animal+food.swift 3 | // ExtensionApp 4 | // 5 | // Created by WuQiong on 6/17/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension Animal { 12 | func eat() { 13 | println("Animal eat") 14 | } 15 | 16 | func hunt() { 17 | println("Animal hunt") 18 | } 19 | } -------------------------------------------------------------------------------- /ExtensionApp/ExtensionApp/Animal+play.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Animal+play.swift 3 | // ExtensionApp 4 | // 5 | // Created by WuQiong on 6/17/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension Animal { 12 | func run() { 13 | println("Animal run") 14 | } 15 | 16 | func jump() { 17 | println("Animal jump") 18 | } 19 | } -------------------------------------------------------------------------------- /ExtensionApp/ExtensionApp/Animal.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Animal.swift 3 | // ExtensionApp 4 | // 5 | // Created by WuQiong on 6/17/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class Animal: NSObject { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /ExtensionApp/ExtensionApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ExtensionApp/ExtensionApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ExtensionApp/ExtensionApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /ExtensionApp/ExtensionApp/String+print.swift: -------------------------------------------------------------------------------- 1 | // 2 | // String+print.swift 3 | // ExtensionApp 4 | // 5 | // Created by WuQiong on 6/17/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension String { 12 | func printx() { 13 | println("Hello, \(self)") 14 | } 15 | } -------------------------------------------------------------------------------- /ExtensionApp/ExtensionAppTests/ExtensionAppTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExtensionAppTests.swift 3 | // ExtensionAppTests 4 | // 5 | // Created by WuQiong on 6/17/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class ExtensionAppTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /ExtensionApp/ExtensionAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /FileApp/FileApp/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/FileApp/FileApp/1.jpg -------------------------------------------------------------------------------- /FileApp/FileApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /FileApp/FileApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /FileApp/FileApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /FileApp/FileAppTests/FileAppTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FileAppTests.swift 3 | // FileAppTests 4 | // 5 | // Created by WuQiong on 6/25/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class FileAppTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /FileApp/FileAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /FileManagerApp/FileManagerApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /FileManagerApp/FileManagerApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /FileManagerApp/FileManagerApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /FileManagerApp/FileManagerAppTests/FileManagerAppTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FileManagerAppTests.swift 3 | // FileManagerAppTests 4 | // 5 | // Created by WuQiong on 6/25/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class FileManagerAppTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /FileManagerApp/FileManagerAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /FlowControl.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /FlowControl.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /FlowControl2.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /FlowControl2.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /JsonPlayground.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /JsonPlayground.playground/section-1.swift: -------------------------------------------------------------------------------- 1 | // Playground - noun: a place where people can play 2 | 3 | import Cocoa 4 | 5 | var str = NSString(contentsOfFile: "/Users/cheetah/Desktop/test.json") 6 | //var dict: NSDictionary = NSJSONSerialization.JSONObjectWithData(str.dataUsingEncoding(NSUTF8StringEncoding), options: NSJSONReadingOptions.AllowFragments, error: nil) as NSDictionary 7 | -------------------------------------------------------------------------------- /JsonPlayground.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Jump.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Jump.playground/section-1.swift: -------------------------------------------------------------------------------- 1 | // Playground - noun: a place where people can play 2 | 3 | import UIKit 4 | 5 | var tView = UIView(frame: CGRect(x: 0, y: 0, width: 320, height: 480)) 6 | tView.backgroundColor = UIColor.redColor() 7 | 8 | var button: UIButton = UIButton.buttonWithType(UIButtonType.InfoDark) as UIButton 9 | button.frame = CGRect(x: 0, y: 0, width: 50, height: 50) 10 | tView.addSubview(button as UIView) -------------------------------------------------------------------------------- /Jump.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /LoginApp/LoginApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /LoginApp/LoginApp.xcodeproj/project.xcworkspace/xcuserdata/cheetah.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/LoginApp/LoginApp.xcodeproj/project.xcworkspace/xcuserdata/cheetah.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /LoginApp/LoginApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /LoginApp/LoginApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /LoginApp/LoginApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /LoginApp/LoginAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /LoginApp/LoginAppTests/LoginAppTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LoginAppTests.swift 3 | // LoginAppTests 4 | // 5 | // Created by WuQiong on 6/10/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class LoginAppTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /MyPlayground.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /MyPlayground.playground/section-1.swift: -------------------------------------------------------------------------------- 1 | // Playground - noun: a place where people can play 2 | 3 | import Cocoa 4 | 5 | var a = -100 6 | abs(a) 7 | 8 | advance(a, 10) 9 | advance(a, 1000, 9000) 10 | 11 | alignof(Int64) 12 | alignof(Array) 13 | -------------------------------------------------------------------------------- /MyPlayground.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /NavApp1/NavApp1/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /NavApp1/NavApp1/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /NavApp1/NavApp1/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /NavApp1/NavApp1/SecondViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SecondViewController.swift 3 | // NavApp1 4 | // 5 | // Created by WuQiong on 6/19/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class SecondViewController: UIViewController { 12 | var weight2 = 0 13 | 14 | @IBAction func didClicked(sender : AnyObject) { 15 | println("second view controller: \(weight2)") 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /NavApp1/NavApp1/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // NavApp1 4 | // 5 | // Created by WuQiong on 6/19/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | 12 | //压栈(进栈)push 13 | //出栈pop 14 | 15 | class ViewController: UIViewController { 16 | var weight = 100 17 | 18 | override func viewDidLoad() { 19 | super.viewDidLoad() 20 | 21 | // var viewCtrl = SecondViewController() 22 | // viewCtrl.weight2 = weight 23 | } 24 | 25 | override func didReceiveMemoryWarning() { 26 | super.didReceiveMemoryWarning() 27 | // Dispose of any resources that can be recreated. 28 | } 29 | 30 | //重载 31 | override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) { 32 | if segue.identifier == "first" { 33 | var destController: SecondViewController = segue.destinationViewController as SecondViewController 34 | destController.weight2 = weight 35 | } 36 | } 37 | 38 | } 39 | 40 | -------------------------------------------------------------------------------- /NavApp1/NavApp1Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /NavApp1/NavApp1Tests/NavApp1Tests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NavApp1Tests.swift 3 | // NavApp1Tests 4 | // 5 | // Created by WuQiong on 6/19/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class NavApp1Tests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /NetworkApp/NetworkApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /NetworkApp/NetworkApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /NetworkApp/NetworkApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /NetworkApp/NetworkAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /NetworkApp/NetworkAppTests/NetworkAppTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NetworkAppTests.swift 3 | // NetworkAppTests 4 | // 5 | // Created by WuQiong on 6/24/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class NetworkAppTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /NoteApp/NoteApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /NoteApp/NoteApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /NoteApp/NoteApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /NoteApp/NoteAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /NoteApp/NoteAppTests/NoteAppTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NoteAppTests.swift 3 | // NoteAppTests 4 | // 5 | // Created by WuQiong on 6/18/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class NoteAppTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /NoteApp4/NoteApp4/DetailViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DetailViewController.swift 3 | // NoteApp4 4 | // 5 | // Created by WuQiong on 6/19/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | //栈 11 | 12 | class DetailViewController: UIViewController { 13 | 14 | @IBOutlet var detailDescriptionLabel: UILabel 15 | 16 | 17 | var detailItem: AnyObject? { 18 | didSet { 19 | // Update the view. 20 | self.configureView() 21 | } 22 | } 23 | 24 | func configureView() { 25 | // Update the user interface for the detail item. 26 | if let detail: AnyObject = self.detailItem { 27 | if let label = self.detailDescriptionLabel { 28 | label.text = detail.description 29 | } 30 | } 31 | } 32 | 33 | override func viewDidLoad() { 34 | super.viewDidLoad() 35 | // Do any additional setup after loading the view, typically from a nib. 36 | self.configureView() 37 | } 38 | 39 | override func didReceiveMemoryWarning() { 40 | super.didReceiveMemoryWarning() 41 | // Dispose of any resources that can be recreated. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /NoteApp4/NoteApp4/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /NoteApp4/NoteApp4/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /NoteApp4/NoteApp4Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /NoteApp4/NoteApp4Tests/NoteApp4Tests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NoteApp4Tests.swift 3 | // NoteApp4Tests 4 | // 5 | // Created by WuQiong on 6/19/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class NoteApp4Tests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /Operator.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Operator.playground/section-1.swift: -------------------------------------------------------------------------------- 1 | // Playground - noun: a place where people can play 2 | 3 | import UIKit 4 | 5 | var str = "abc" + "efg" 6 | 7 | var a = 10 8 | var b = a++ //b的值为10 9 | b = a++ 10 | 11 | var result = (a < b) ? a : b 12 | --a 13 | a-- 14 | a |= 2 -------------------------------------------------------------------------------- /Operator.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Optional.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Optional.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Protocol.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Protocol.playground/section-1.swift: -------------------------------------------------------------------------------- 1 | // Playground - noun: a place where people can play 2 | 3 | import Cocoa 4 | 5 | protocol Action { 6 | func eat() 7 | func run(speed: Double) 8 | } 9 | 10 | class Dog : Action { 11 | func eat() { 12 | println("Dog eat") 13 | } 14 | 15 | func run(speed: Double) { 16 | println("Dog run") 17 | } 18 | } 19 | 20 | class Cat : Action { 21 | func eat() { 22 | println("Cat eat") 23 | } 24 | 25 | func run(speed: Double) { 26 | println("Cat run") 27 | } 28 | } 29 | 30 | class Human { 31 | var pet: Action! 32 | 33 | func call() { 34 | pet.eat() 35 | } 36 | } 37 | 38 | class Robot : Action { 39 | func eat() { 40 | println("Robot eat") 41 | } 42 | 43 | func run(speed: Double) { 44 | println("Robot eat") 45 | } 46 | } 47 | 48 | var human: Human = Human() 49 | var dog: Dog = Dog() 50 | human.pet = dog 51 | human.call() 52 | 53 | var cat: Cat = Cat() 54 | human.pet = cat 55 | human.call() 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /Protocol.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ScoreApp/ScoreApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ScoreApp/ScoreApp/Images.xcassets/Delete.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "Delete.png" 7 | } 8 | ], 9 | "info" : { 10 | "version" : 1, 11 | "author" : "xcode" 12 | } 13 | } -------------------------------------------------------------------------------- /ScoreApp/ScoreApp/Images.xcassets/Delete.imageset/Delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/ScoreApp/ScoreApp/Images.xcassets/Delete.imageset/Delete.png -------------------------------------------------------------------------------- /ScoreApp/ScoreApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ScoreApp/ScoreApp/Images.xcassets/keditbookmarks.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "keditbookmarks.png" 7 | } 8 | ], 9 | "info" : { 10 | "version" : 1, 11 | "author" : "xcode" 12 | } 13 | } -------------------------------------------------------------------------------- /ScoreApp/ScoreApp/Images.xcassets/keditbookmarks.imageset/keditbookmarks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/ScoreApp/ScoreApp/Images.xcassets/keditbookmarks.imageset/keditbookmarks.png -------------------------------------------------------------------------------- /ScoreApp/ScoreApp/Images.xcassets/right.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "right.png" 7 | } 8 | ], 9 | "info" : { 10 | "version" : 1, 11 | "author" : "xcode" 12 | } 13 | } -------------------------------------------------------------------------------- /ScoreApp/ScoreApp/Images.xcassets/right.imageset/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/ScoreApp/ScoreApp/Images.xcassets/right.imageset/right.png -------------------------------------------------------------------------------- /ScoreApp/ScoreApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /ScoreApp/ScoreAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ScoreApp/ScoreAppTests/ScoreAppTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ScoreAppTests.swift 3 | // ScoreAppTests 4 | // 5 | // Created by WuQiong on 6/10/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class ScoreAppTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /SimplePlayer/SimplePlayer/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SimplePlayer/SimplePlayer/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SimplePlayer/SimplePlayer/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /SimplePlayer/SimplePlayerTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /SimplePlayer/SimplePlayerTests/SimplePlayerTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SimplePlayerTests.swift 3 | // SimplePlayerTests 4 | // 5 | // Created by WuQiong on 6/25/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class SimplePlayerTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /SoccerTV/Podfile: -------------------------------------------------------------------------------- 1 | pod 'JSONKit', '~> 1.5pre' 2 | -------------------------------------------------------------------------------- /SoccerTV/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - JSONKit (1.5pre) 3 | 4 | DEPENDENCIES: 5 | - JSONKit (~> 1.5pre) 6 | 7 | SPEC CHECKSUMS: 8 | JSONKit: efef3bbd3372ff33f96b9c6f34cf4fe18e74ab69 9 | 10 | COCOAPODS: 0.33.1 11 | -------------------------------------------------------------------------------- /SoccerTV/Pods/BuildHeaders/JSONKit/JSONKit.h: -------------------------------------------------------------------------------- 1 | ../../JSONKit/JSONKit.h -------------------------------------------------------------------------------- /SoccerTV/Pods/Headers/JSONKit/JSONKit.h: -------------------------------------------------------------------------------- 1 | ../../JSONKit/JSONKit.h -------------------------------------------------------------------------------- /SoccerTV/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - JSONKit (1.5pre) 3 | 4 | DEPENDENCIES: 5 | - JSONKit (~> 1.5pre) 6 | 7 | SPEC CHECKSUMS: 8 | JSONKit: efef3bbd3372ff33f96b9c6f34cf4fe18e74ab69 9 | 10 | COCOAPODS: 0.33.1 11 | -------------------------------------------------------------------------------- /SoccerTV/Pods/Pods-JSONKit-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-JSONKit.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/JSONKit" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/JSONKit" 4 | OTHER_LDFLAGS = -ObjC 5 | PODS_ROOT = ${SRCROOT} -------------------------------------------------------------------------------- /SoccerTV/Pods/Pods-JSONKit-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_JSONKit : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_JSONKit 5 | @end 6 | -------------------------------------------------------------------------------- /SoccerTV/Pods/Pods-JSONKit-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-environment.h" 6 | -------------------------------------------------------------------------------- /SoccerTV/Pods/Pods-JSONKit.xcconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/SoccerTV/Pods/Pods-JSONKit.xcconfig -------------------------------------------------------------------------------- /SoccerTV/Pods/Pods-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - http://cocoapods.org 4 | -------------------------------------------------------------------------------- /SoccerTV/Pods/Pods-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - http://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /SoccerTV/Pods/Pods-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods : NSObject 3 | @end 4 | @implementation PodsDummy_Pods 5 | @end 6 | -------------------------------------------------------------------------------- /SoccerTV/Pods/Pods-environment.h: -------------------------------------------------------------------------------- 1 | 2 | // To check if a library is compiled with CocoaPods you 3 | // can use the `COCOAPODS` macro definition which is 4 | // defined in the xcconfigs so it is available in 5 | // headers also when they are imported in the client 6 | // project. 7 | 8 | 9 | // JSONKit 10 | #define COCOAPODS_POD_AVAILABLE_JSONKit 11 | // This library does not follow semantic-versioning, 12 | // so we were not able to define version macros. 13 | // Please contact the author. 14 | // Version: 1.5pre. 15 | 16 | -------------------------------------------------------------------------------- /SoccerTV/Pods/Pods.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/JSONKit" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers" -isystem "${PODS_ROOT}/Headers/JSONKit" 4 | OTHER_LDFLAGS = -ObjC 5 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /SoccerTV/SoccerTV/ChannelModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // ChannelModel.h 3 | // SoccerTV 4 | // 5 | // Created by WuQiong on 6/15/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ChannelModel : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SoccerTV/SoccerTV/ChannelModel.mm: -------------------------------------------------------------------------------- 1 | // 2 | // ChannelModel.m 3 | // SoccerTV 4 | // 5 | // Created by WuQiong on 6/15/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | #import "ChannelModel.h" 10 | 11 | @implementation ChannelModel 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SoccerTV/SoccerTV/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SoccerTV/SoccerTV/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SoccerTV/SoccerTV/SoccerTV-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import 6 | #import -------------------------------------------------------------------------------- /SoccerTV/SoccerTVTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /SoccerTV/SoccerTVTests/SoccerTVTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SoccerTVTests.swift 3 | // SoccerTVTests 4 | // 5 | // Created by WuQiong on 6/15/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class SoccerTVTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /SoccerTV5/SoccerTV5/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SoccerTV5 4 | // 5 | // Created by WuQiong on 6/15/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class AppDelegate: NSObject, NSApplicationDelegate { 12 | 13 | 14 | 15 | func applicationDidFinishLaunching(aNotification: NSNotification?) { 16 | // Insert code here to initialize your application 17 | } 18 | 19 | func applicationWillTerminate(aNotification: NSNotification?) { 20 | // Insert code here to tear down your application 21 | } 22 | 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /SoccerTV5/SoccerTV5/DVIChannel.h: -------------------------------------------------------------------------------- 1 | // 2 | // DVIChannel.h 3 | // SoccerTV5 4 | // 5 | // Created by WuQiong on 6/15/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DVIChannel : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SoccerTV5/SoccerTV5/DVIChannel.m: -------------------------------------------------------------------------------- 1 | // 2 | // DVIChannel.m 3 | // SoccerTV5 4 | // 5 | // Created by WuQiong on 6/15/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | #import "DVIChannel.h" 10 | 11 | @implementation DVIChannel 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SoccerTV5/SoccerTV5/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /SoccerTV5/SoccerTV5/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | NSHumanReadableCopyright 28 | Copyright © 2014 长沙戴维营教育. All rights reserved. 29 | NSMainStoryboardFile 30 | Main 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /SoccerTV5/SoccerTV5/SoccerTV5-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import 6 | #import -------------------------------------------------------------------------------- /SoccerTV5/SoccerTV5/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SoccerTV5 4 | // 5 | // Created by WuQiong on 6/15/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ViewController: NSViewController { 12 | var mediaPlayer: VLCMediaPlayer! 13 | 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | 17 | mediaPlayer = VLCMediaPlayer(videoView: self.view as VLCVideoView) 18 | 19 | let url = NSURL(string: "rtsp://stream2.gzcbn.tv:1935/app_2/ls_1.stream?domain=gztv") 20 | let media = VLCMedia(URL: url) 21 | mediaPlayer.setMedia(media) 22 | mediaPlayer.play() 23 | } 24 | 25 | override var representedObject: AnyObject? { 26 | didSet { 27 | // Update the view, if already loaded. 28 | } 29 | 30 | } 31 | 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /SoccerTV5/SoccerTV5/main.swift: -------------------------------------------------------------------------------- 1 | // 2 | // main.swift 3 | // SoccerTV5 4 | // 5 | // Created by WuQiong on 6/15/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | NSApplicationMain(C_ARGC, C_ARGV) 12 | -------------------------------------------------------------------------------- /SoccerTV5/SoccerTV5Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /SoccerTV5/SoccerTV5Tests/SoccerTV5Tests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SoccerTV5Tests.swift 3 | // SoccerTV5Tests 4 | // 5 | // Created by WuQiong on 6/15/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class SoccerTV5Tests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /SwiftApp_1/SwiftApp_1.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SwiftApp_1/SwiftApp_1.xcodeproj/project.xcworkspace/xcuserdata/cheetah.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/SwiftApp_1/SwiftApp_1.xcodeproj/project.xcworkspace/xcuserdata/cheetah.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SwiftApp_1/SwiftApp_1.xcodeproj/xcuserdata/cheetah.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SwiftApp_1.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 0059DDCC19401E920020B035 16 | 17 | primary 18 | 19 | 20 | 0059DDDE19401E920020B035 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /SwiftApp_1/SwiftApp_1/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SwiftApp_1/SwiftApp_1/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SwiftApp_1/SwiftApp_1/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /SwiftApp_1/SwiftApp_1/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SwiftApp_1 4 | // 5 | // Created by WuQiong on 6/5/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | @IBOutlet var label : UILabel 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | self.label.text = "戴维营教育欢迎你!" 19 | } 20 | 21 | override func didReceiveMemoryWarning() { 22 | super.didReceiveMemoryWarning() 23 | // Dispose of any resources that can be recreated. 24 | } 25 | 26 | @IBAction func didClicked(sender : UIButton) { 27 | var viewController:SecondViewController = SecondViewController(nibName: nil, bundle: nil) 28 | self.presentViewController(viewController, animated: true, completion: { 29 | println("end present") 30 | }) 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /SwiftApp_1/SwiftApp_1Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /SwiftApp_1/SwiftApp_1Tests/SwiftApp_1Tests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftApp_1Tests.swift 3 | // SwiftApp_1Tests 4 | // 5 | // Created by WuQiong on 6/5/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class SwiftApp_1Tests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /SwiftApp_2/SwiftApp_2.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SwiftApp_2/SwiftApp_2.xcodeproj/project.xcworkspace/xcuserdata/cheetah.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/SwiftApp_2/SwiftApp_2.xcodeproj/project.xcworkspace/xcuserdata/cheetah.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SwiftApp_2/SwiftApp_2.xcodeproj/xcuserdata/cheetah.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /SwiftApp_2/SwiftApp_2.xcodeproj/xcuserdata/cheetah.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SwiftApp_2.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 0076A6251940559100592868 16 | 17 | primary 18 | 19 | 20 | 0076A6371940559200592868 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /SwiftApp_2/SwiftApp_2/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SwiftApp_2/SwiftApp_2/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SwiftApp_2/SwiftApp_2/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /SwiftApp_2/SwiftApp_2/Singleton.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Singleton.swift 3 | // SwiftApp_2 4 | // 5 | // Created by WuQiong on 6/6/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class Singleton: NSObject { 12 | class var sharedInstance: Singleton { 13 | get { 14 | struct Static { 15 | static var singleton: Singleton? = nil 16 | static var token: dispatch_once_t = 0 17 | } 18 | 19 | println("xxxx") 20 | 21 | dispatch_once(&Static.token) { 22 | Static.singleton = Singleton.allocWithZone(nil) 23 | } 24 | 25 | return Static.singleton! 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /SwiftApp_2/SwiftApp_2/Student.h: -------------------------------------------------------------------------------- 1 | // 2 | // Student.h 3 | // SwiftApp_2 4 | // 5 | // Created by WuQiong on 6/5/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface Student : NSObject 12 | - (void)print; 13 | @end 14 | -------------------------------------------------------------------------------- /SwiftApp_2/SwiftApp_2/Student.m: -------------------------------------------------------------------------------- 1 | // 2 | // Student.m 3 | // SwiftApp_2 4 | // 5 | // Created by WuQiong on 6/5/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | #import "Student.h" 10 | 11 | #import "SwiftApp_2-Swift.h" 12 | 13 | @implementation Student 14 | - (void)print 15 | { 16 | ViewController *vCtrl = [[ViewController alloc] init]; 17 | NSLog(@"%@", vCtrl); 18 | } 19 | @end 20 | -------------------------------------------------------------------------------- /SwiftApp_2/SwiftApp_2/SwiftApp_2-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "Student.h" -------------------------------------------------------------------------------- /SwiftApp_2/SwiftApp_2Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /SwiftApp_2/SwiftApp_2Tests/SwiftApp_2Tests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftApp_2Tests.swift 3 | // SwiftApp_2Tests 4 | // 5 | // Created by WuQiong on 6/5/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class SwiftApp_2Tests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /SwiftApp_3/SwiftApp_3.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SwiftApp_3/SwiftApp_3.xcodeproj/project.xcworkspace/xcuserdata/cheetah.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/SwiftApp_3/SwiftApp_3.xcodeproj/project.xcworkspace/xcuserdata/cheetah.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SwiftApp_3/SwiftApp_3.xcodeproj/xcuserdata/cheetah.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SwiftApp_3.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 005D4C7119415C3D003ACBC9 16 | 17 | primary 18 | 19 | 20 | 005D4C8319415C3D003ACBC9 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /SwiftApp_3/SwiftApp_3/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SwiftApp_3/SwiftApp_3/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SwiftApp_3/SwiftApp_3/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /SwiftApp_3/SwiftApp_3Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /SwiftApp_3/SwiftApp_3Tests/SwiftApp_3Tests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftApp_3Tests.swift 3 | // SwiftApp_3Tests 4 | // 5 | // Created by WuQiong on 6/6/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class SwiftApp_3Tests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /SwiftNote/SwiftNote/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SwiftNote/SwiftNote/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SwiftNote/SwiftNote/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /SwiftNote/SwiftNoteTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /SwiftNote/SwiftNoteTests/SwiftNoteTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftNoteTests.swift 3 | // SwiftNoteTests 4 | // 5 | // Created by WuQiong on 6/11/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class SwiftNoteTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /SwiftOCTest/SwiftOCTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SwiftOCTest/SwiftOCTest.xcodeproj/project.xcworkspace/xcuserdata/cheetah.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/SwiftOCTest/SwiftOCTest.xcodeproj/project.xcworkspace/xcuserdata/cheetah.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SwiftOCTest/SwiftOCTest/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SwiftOCTest/SwiftOCTest/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SwiftOCTest/SwiftOCTest/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /SwiftOCTest/SwiftOCTest/OCViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OCViewController.h 3 | // SwiftOCTest 4 | // 5 | // Created by WuQiong on 6/10/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface OCViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SwiftOCTest/SwiftOCTest/SwiftOCTest-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "OCViewController.h" -------------------------------------------------------------------------------- /SwiftOCTest/SwiftOCTest/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SwiftOCTest 4 | // 5 | // Created by WuQiong on 6/10/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do any additional setup after loading the view, typically from a nib. 16 | 17 | // var beginTime = CFAbsoluteTimeGetCurrent() 18 | // for var index = 0; index < 10000; index++ { 19 | // print(CFAbsoluteTimeGetCurrent()) 20 | // } 21 | // var endTime = CFAbsoluteTimeGetCurrent() 22 | // println("swift: \(endTime - beginTime)") 23 | // 24 | // var url = NSURL.URLWithString("http://www.i7wu.cn/bang/xiazai-0-3.htm") 25 | // var str = NSString(contentsOfURL: url, encoding: NSUnicodeStringEncoding, error: nil) 26 | // println("\(str)") 27 | } 28 | 29 | override func didReceiveMemoryWarning() { 30 | super.didReceiveMemoryWarning() 31 | // Dispose of any resources that can be recreated. 32 | } 33 | 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /SwiftOCTest/SwiftOCTestTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /SwiftOCTest/SwiftOCTestTests/SwiftOCTestTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftOCTestTests.swift 3 | // SwiftOCTestTests 4 | // 5 | // Created by WuQiong on 6/10/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class SwiftOCTestTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /Tree.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Tree.playground/section-1.swift: -------------------------------------------------------------------------------- 1 | // Playground - noun: a place where people can play 2 | 3 | import Cocoa 4 | 5 | func grow(cycle: Int) -> Int { 6 | var height = 1 7 | 8 | for var i = 1; i <= cycle; i++ { 9 | if i % 2 == 0 { 10 | height += 1 11 | } 12 | else { 13 | height *= 2 14 | } 15 | } 16 | 17 | return height 18 | } 19 | 20 | grow(0) 21 | 22 | 23 | //(Int, Int) -> Int 24 | var result = { 25 | (a: Int, b: Int) -> Int in 26 | return a+b 27 | 28 | } 29 | result(1,2) 30 | func f(a: (Int, Int) -> Int){ 31 | println("\(a(20, 30))") 32 | } 33 | 34 | f(result) 35 | f( { $0 * $1 } ) 36 | 37 | f({ 38 | (a: Int, b: Int) -> Int in 39 | return a % b 40 | }) 41 | 42 | var arr = [1, 29, 20, 5] 43 | var s = sort(arr,{(a:Int,b:Int) in 44 | return a > b 45 | }) 46 | 47 | var a: Int = 10 48 | var b: Double = 20 49 | var sum = Double(a) + b 50 | 51 | println(Int.max) 52 | println(Int.min) 53 | 54 | abs(-10) 55 | contains(arr, 51) 56 | 57 | countElements(arr) 58 | arr.count 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /Tree.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /TreeGraph/TreeGraph/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TreeGraph/TreeGraph/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TreeGraph/TreeGraph/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /TreeGraph/TreeGraphTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /TreeGraph/TreeGraphTests/TreeGraphTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TreeGraphTests.swift 3 | // TreeGraphTests 4 | // 5 | // Created by WuQiong on 6/18/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class TreeGraphTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /ViewApp/ViewApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ViewApp/ViewApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ViewApp/ViewApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /ViewApp/ViewApp/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // ViewApp 4 | // 5 | // Created by WuQiong on 6/12/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | @IBOutlet var redView : UIView 13 | 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | 17 | redView.frame = CGRect(x: 0, y: 0, width: 150, height: 50) 18 | // redView.frame = CGRectMake(0, 0, 10, 150) 19 | 20 | var f = CGRect(x: 100, y: 100, width: 100, height: 100) 21 | //创建视图并指定位置和大小 22 | var greenView = UIView(frame: f) 23 | //设置视图的背景色为绿色 24 | greenView.backgroundColor = UIColor.greenColor() 25 | println("\(greenView)") 26 | 27 | //显示绿色视图 28 | self.view.addSubview(greenView) 29 | } 30 | 31 | override func didReceiveMemoryWarning() { 32 | super.didReceiveMemoryWarning() 33 | // Dispose of any resources that can be recreated. 34 | } 35 | 36 | 37 | } 38 | 39 | -------------------------------------------------------------------------------- /ViewApp/ViewAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ViewApp/ViewAppTests/ViewAppTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewAppTests.swift 3 | // ViewAppTests 4 | // 5 | // Created by WuQiong on 6/12/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class ViewAppTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /ViewApp2/ViewApp2/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ViewApp2/ViewApp2/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ViewApp2/ViewApp2/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /ViewApp2/ViewApp2/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // ViewApp2 4 | // 5 | // Created by WuQiong on 6/16/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | @IBOutlet var label : UILabel 13 | 14 | @IBAction func didClicked(sender : AnyObject) { 15 | println("did clicked: \(label.text)") 16 | } 17 | 18 | override func viewDidLoad() { 19 | super.viewDidLoad() 20 | // Do any additional setup after loading the view, typically from a nib. 21 | } 22 | 23 | override func didReceiveMemoryWarning() { 24 | super.didReceiveMemoryWarning() 25 | // Dispose of any resources that can be recreated. 26 | } 27 | 28 | 29 | } 30 | 31 | -------------------------------------------------------------------------------- /ViewApp2/ViewApp2Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ViewApp2/ViewApp2Tests/ViewApp2Tests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewApp2Tests.swift 3 | // ViewApp2Tests 4 | // 5 | // Created by WuQiong on 6/16/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class ViewApp2Tests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /WebApp/WebApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /WebApp/WebApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /WebApp/WebApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /WebApp/WebAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /WebApp/WebAppTests/WebAppTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WebAppTests.swift 3 | // WebAppTests 4 | // 5 | // Created by WuQiong on 6/19/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class WebAppTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /WorldCupTV/WorldCupTV/Channel.h: -------------------------------------------------------------------------------- 1 | // 2 | // Channel.h 3 | // WorldCupTV 4 | // 5 | // Created by WuQiong on 6/16/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface Channel : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /WorldCupTV/WorldCupTV/Channel.mm: -------------------------------------------------------------------------------- 1 | // 2 | // Channel.m 3 | // WorldCupTV 4 | // 5 | // Created by WuQiong on 6/16/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | #import "Channel.h" 10 | 11 | @implementation Channel 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /WorldCupTV/WorldCupTV/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /WorldCupTV/WorldCupTV/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /WorldCupTV/WorldCupTV/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // WorldCupTV 4 | // 5 | // Created by WuQiong on 6/16/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | var vlcPlayer: VLCMediaPlayer! 13 | 14 | @IBOutlet var videoView: UIView 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | 19 | vlcPlayer = VLCMediaPlayer(options: nil) 20 | vlcPlayer.drawable = self.videoView 21 | 22 | vlcPlayer.stop() 23 | 24 | var url: NSURL = NSURL(string: "rtsp://stream2.gzcbn.tv:1935/app_2/ls_1.stream?domain=gztv") 25 | var media: VLCMedia = VLCMedia.mediaWithURL(url) as VLCMedia 26 | 27 | vlcPlayer.setMedia(media) 28 | vlcPlayer.play() 29 | } 30 | 31 | override func didReceiveMemoryWarning() { 32 | super.didReceiveMemoryWarning() 33 | // Dispose of any resources that can be recreated. 34 | } 35 | 36 | 37 | } 38 | 39 | -------------------------------------------------------------------------------- /WorldCupTV/WorldCupTV/WorldCupTV-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import 6 | -------------------------------------------------------------------------------- /WorldCupTV/WorldCupTVTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /WorldCupTV/WorldCupTVTests/WorldCupTVTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WorldCupTVTests.swift 3 | // WorldCupTVTests 4 | // 5 | // Created by WuQiong on 6/16/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class WorldCupTVTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /enum.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /enum.playground/section-1.swift: -------------------------------------------------------------------------------- 1 | // Playground - noun: a place where people can play 2 | 3 | import Cocoa 4 | 5 | //raw value 6 | //associate value 7 | enum Week : Int{ 8 | case Mon 9 | case Sun 10 | 11 | func print() { 12 | switch self { 13 | case .Mon: 14 | println("星期一") 15 | case .Sun: 16 | println("星期天") 17 | } 18 | } 19 | } 20 | 21 | var week1 = Week.Mon 22 | week1.print() 23 | week1.toRaw() 24 | 25 | var cl = { () -> Void in 26 | var a = 10 27 | var b = 20 28 | var c = a + b 29 | 30 | println("\(c)") 31 | } 32 | 33 | cl() 34 | 35 | func locally(work: () -> () ) { 36 | work() 37 | } 38 | 39 | locally { 40 | println("本地代码") 41 | } 42 | 43 | let evens = Array(filter(1..10) { $0 % 2 == 0 }) 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /enum.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /iOS_Playground.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /iOS_Playground.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /时间安排.playground/Results.playgrounddata: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/时间安排.playground/Results.playgrounddata -------------------------------------------------------------------------------- /时间安排.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /时间安排.playground/section-1.swift: -------------------------------------------------------------------------------- 1 | 1. 上课时间 2 | 周一至周六 3 | 9:00-12:00 4 | 12:00-13:30 5 | 13:30-17:30 6 | 17:30-18:30 7 | 18:30-21:00(11:00) 8 | 9 | 2. 作业 10 | - 博客(CSDN、cnblogs) 11 | - CocoaChina(论坛)、StackOverFlow.com 12 | - bbs.diveinedu.com 13 | - 作业 14 | 15 | 3. 讨论 16 | 每周一次讨论(周六上午): 17 | - 分享好的东西(10分钟) 18 | - 问题 19 | 20 | 4. 回答问题 21 | 22 | 5. 笔记 23 | - 网易云笔记 24 | - EverNote 25 | - OneNote 26 | - WizNote 27 | .... -------------------------------------------------------------------------------- /时间安排.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /签到/签到/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /签到/签到/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /签到/签到/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /签到/签到Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.diveinedu.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /签到/签到Tests/__Tests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // __Tests.swift 3 | // 签到Tests 4 | // 5 | // Created by WuQiong on 6/10/14. 6 | // Copyright (c) 2014 长沙戴维营教育. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class __Tests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /网络播放器.pages/Data/Hardcover_bullet_black-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/网络播放器.pages/Data/Hardcover_bullet_black-13.png -------------------------------------------------------------------------------- /网络播放器.pages/Data/pasted-image-15.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/网络播放器.pages/Data/pasted-image-15.tif -------------------------------------------------------------------------------- /网络播放器.pages/Data/pasted-image-17.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/网络播放器.pages/Data/pasted-image-17.tif -------------------------------------------------------------------------------- /网络播放器.pages/Data/pasted-image-19.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/网络播放器.pages/Data/pasted-image-19.tif -------------------------------------------------------------------------------- /网络播放器.pages/Data/pasted-image-21.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/网络播放器.pages/Data/pasted-image-21.tif -------------------------------------------------------------------------------- /网络播放器.pages/Data/pasted-image-23.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/网络播放器.pages/Data/pasted-image-23.tif -------------------------------------------------------------------------------- /网络播放器.pages/Data/pasted-image-small-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/网络播放器.pages/Data/pasted-image-small-16.png -------------------------------------------------------------------------------- /网络播放器.pages/Data/pasted-image-small-18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/网络播放器.pages/Data/pasted-image-small-18.png -------------------------------------------------------------------------------- /网络播放器.pages/Data/pasted-image-small-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/网络播放器.pages/Data/pasted-image-small-20.png -------------------------------------------------------------------------------- /网络播放器.pages/Data/pasted-image-small-22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/网络播放器.pages/Data/pasted-image-small-22.png -------------------------------------------------------------------------------- /网络播放器.pages/Data/pasted-image-small-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/网络播放器.pages/Data/pasted-image-small-24.png -------------------------------------------------------------------------------- /网络播放器.pages/Index.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/网络播放器.pages/Index.zip -------------------------------------------------------------------------------- /网络播放器.pages/Metadata/BuildVersionHistory.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Template: Blank (2014-02-28 10:44) 6 | M5.2-1860-1 7 | 8 | 9 | -------------------------------------------------------------------------------- /网络播放器.pages/Metadata/DocumentIdentifier: -------------------------------------------------------------------------------- 1 | 28FA6772-1BF6-46D0-927D-3C1050164998 -------------------------------------------------------------------------------- /网络播放器.pages/Metadata/Properties.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/网络播放器.pages/Metadata/Properties.plist -------------------------------------------------------------------------------- /网络播放器.pages/preview-micro.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/网络播放器.pages/preview-micro.jpg -------------------------------------------------------------------------------- /网络播放器.pages/preview-web.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/网络播放器.pages/preview-web.jpg -------------------------------------------------------------------------------- /网络播放器.pages/preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiveinEdu/divein_swift/3cea67751bd1e55ce9dd80b2ea9fa8f49f943ac2/网络播放器.pages/preview.jpg --------------------------------------------------------------------------------