├── .gitignore
├── README.md
├── issue01
├── README.md
├── exampleCode
│ ├── swift-weekly-issue01-example01
│ │ ├── swift-weekly-issue01-example01.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ ├── project.xcworkspace
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ ├── xcshareddata
│ │ │ │ │ └── swift-weekly-issue01-example01.xccheckout
│ │ │ │ └── xcuserdata
│ │ │ │ │ └── vandadnp.xcuserdatad
│ │ │ │ │ └── UserInterfaceState.xcuserstate
│ │ │ └── xcuserdata
│ │ │ │ └── vandadnp.xcuserdatad
│ │ │ │ └── xcschemes
│ │ │ │ ├── swift-weekly-issue01-example01.xcscheme
│ │ │ │ └── xcschememanagement.plist
│ │ ├── swift-weekly-issue01-example01
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Base.lproj
│ │ │ │ ├── LaunchScreen.xib
│ │ │ │ └── Main.storyboard
│ │ │ ├── Images.xcassets
│ │ │ │ └── AppIcon.appiconset
│ │ │ │ │ └── Contents.json
│ │ │ ├── Info.plist
│ │ │ ├── MyPlayground.playground
│ │ │ │ ├── contents.xcplayground
│ │ │ │ ├── section-1.swift
│ │ │ │ └── timeline.xctimeline
│ │ │ └── ViewController.swift
│ │ └── swift-weekly-issue01-example01Tests
│ │ │ ├── Info.plist
│ │ │ └── swift_weekly_issue01_example01Tests.swift
│ ├── swift-weekly-issue01-example02
│ │ ├── swift-weekly-issue01-example02.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ ├── project.xcworkspace
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ ├── xcshareddata
│ │ │ │ │ └── swift-weekly-issue01-example02.xccheckout
│ │ │ │ └── xcuserdata
│ │ │ │ │ └── vandadnp.xcuserdatad
│ │ │ │ │ └── UserInterfaceState.xcuserstate
│ │ │ └── xcuserdata
│ │ │ │ └── vandadnp.xcuserdatad
│ │ │ │ └── xcschemes
│ │ │ │ ├── swift-weekly-issue01-example02.xcscheme
│ │ │ │ └── xcschememanagement.plist
│ │ ├── swift-weekly-issue01-example02
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Base.lproj
│ │ │ │ ├── LaunchScreen.xib
│ │ │ │ └── Main.storyboard
│ │ │ ├── Images.xcassets
│ │ │ │ └── AppIcon.appiconset
│ │ │ │ │ └── Contents.json
│ │ │ ├── Info.plist
│ │ │ ├── MyPlayground.playground
│ │ │ │ ├── contents.xcplayground
│ │ │ │ ├── section-1.swift
│ │ │ │ └── timeline.xctimeline
│ │ │ └── ViewController.swift
│ │ └── swift-weekly-issue01-example02Tests
│ │ │ ├── Info.plist
│ │ │ └── swift_weekly_issue01_example02Tests.swift
│ ├── swift-weekly-issue01-example03
│ │ ├── swift-weekly-issue01-example03.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ ├── project.xcworkspace
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ ├── xcshareddata
│ │ │ │ │ └── swift-weekly-issue01-example03.xccheckout
│ │ │ │ └── xcuserdata
│ │ │ │ │ └── vandadnp.xcuserdatad
│ │ │ │ │ └── UserInterfaceState.xcuserstate
│ │ │ └── xcuserdata
│ │ │ │ └── vandadnp.xcuserdatad
│ │ │ │ └── xcschemes
│ │ │ │ ├── swift-weekly-issue01-example03.xcscheme
│ │ │ │ └── xcschememanagement.plist
│ │ ├── swift-weekly-issue01-example03
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Base.lproj
│ │ │ │ ├── LaunchScreen.xib
│ │ │ │ └── Main.storyboard
│ │ │ ├── Images.xcassets
│ │ │ │ └── AppIcon.appiconset
│ │ │ │ │ └── Contents.json
│ │ │ ├── Info.plist
│ │ │ ├── MyPlayground.playground
│ │ │ │ ├── contents.xcplayground
│ │ │ │ ├── section-1.swift
│ │ │ │ └── timeline.xctimeline
│ │ │ └── ViewController.swift
│ │ └── swift-weekly-issue01-example03Tests
│ │ │ ├── Info.plist
│ │ │ └── swift_weekly_issue01_example03Tests.swift
│ ├── swift-weekly-issue01-example04
│ │ ├── swift-weekly-issue01-example04.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ ├── project.xcworkspace
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ ├── xcshareddata
│ │ │ │ │ └── swift-weekly-issue01-example04.xccheckout
│ │ │ │ └── xcuserdata
│ │ │ │ │ └── vandadnp.xcuserdatad
│ │ │ │ │ └── UserInterfaceState.xcuserstate
│ │ │ └── xcuserdata
│ │ │ │ └── vandadnp.xcuserdatad
│ │ │ │ └── xcschemes
│ │ │ │ ├── swift-weekly-issue01-example04.xcscheme
│ │ │ │ └── xcschememanagement.plist
│ │ ├── swift-weekly-issue01-example04
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Base.lproj
│ │ │ │ ├── LaunchScreen.xib
│ │ │ │ └── Main.storyboard
│ │ │ ├── Images.xcassets
│ │ │ │ └── AppIcon.appiconset
│ │ │ │ │ └── Contents.json
│ │ │ ├── Info.plist
│ │ │ ├── MyPlayground.playground
│ │ │ │ ├── contents.xcplayground
│ │ │ │ ├── section-1.swift
│ │ │ │ └── timeline.xctimeline
│ │ │ └── ViewController.swift
│ │ └── swift-weekly-issue01-example04Tests
│ │ │ ├── Info.plist
│ │ │ └── swift_weekly_issue01_example04Tests.swift
│ ├── swift-weekly-issue01-example05
│ │ ├── swift-weekly-issue01-example05.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ ├── project.xcworkspace
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ ├── xcshareddata
│ │ │ │ │ └── swift-weekly-issue01-example05.xccheckout
│ │ │ │ └── xcuserdata
│ │ │ │ │ └── vandadnp.xcuserdatad
│ │ │ │ │ └── UserInterfaceState.xcuserstate
│ │ │ └── xcuserdata
│ │ │ │ └── vandadnp.xcuserdatad
│ │ │ │ └── xcschemes
│ │ │ │ ├── swift-weekly-issue01-example05.xcscheme
│ │ │ │ └── xcschememanagement.plist
│ │ ├── swift-weekly-issue01-example05
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Base.lproj
│ │ │ │ ├── LaunchScreen.xib
│ │ │ │ └── Main.storyboard
│ │ │ ├── Images.xcassets
│ │ │ │ └── AppIcon.appiconset
│ │ │ │ │ └── Contents.json
│ │ │ ├── Info.plist
│ │ │ ├── MyPlayground.playground
│ │ │ │ ├── contents.xcplayground
│ │ │ │ ├── section-1.swift
│ │ │ │ └── timeline.xctimeline
│ │ │ └── ViewController.swift
│ │ └── swift-weekly-issue01-example05Tests
│ │ │ ├── Info.plist
│ │ │ └── swift_weekly_issue01_example05Tests.swift
│ └── swift-weekly-issue01-example06
│ │ ├── swift-weekly-issue01-example06.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ ├── xcshareddata
│ │ │ │ └── swift-weekly-issue01-example06.xccheckout
│ │ │ └── xcuserdata
│ │ │ │ └── vandadnp.xcuserdatad
│ │ │ │ └── UserInterfaceState.xcuserstate
│ │ └── xcuserdata
│ │ │ └── vandadnp.xcuserdatad
│ │ │ └── xcschemes
│ │ │ ├── swift-weekly-issue01-example06.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ ├── swift-weekly-issue01-example06
│ │ ├── AppDelegate.swift
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.xib
│ │ │ └── Main.storyboard
│ │ ├── Images.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Info.plist
│ │ ├── MyPlayground.playground
│ │ │ ├── contents.xcplayground
│ │ │ ├── section-1.swift
│ │ │ └── timeline.xctimeline
│ │ └── ViewController.swift
│ │ └── swift-weekly-issue01-example06Tests
│ │ ├── Info.plist
│ │ └── swift_weekly_issue01_example06Tests.swift
├── swift-weekly-issue-01.docx
├── swift-weekly-issue-01.epub
├── swift-weekly-issue-01.pages
├── swift-weekly-issue-01.pdf
└── swift-weekly-issue-01.txt
├── issue02
├── README.md
└── exampleCode
│ ├── swift-weekly.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── swift-weekly.xccheckout
│ │ └── xcuserdata
│ │ │ └── vandadnp.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── vandadnp.xcuserdatad
│ │ └── xcschemes
│ │ ├── swift-weekly.xcscheme
│ │ └── xcschememanagement.plist
│ ├── swift-weekly
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── Person.swift
│ └── ViewController.swift
│ └── swift-weeklyTests
│ ├── Info.plist
│ └── swift_weeklyTests.swift
├── issue03
├── README.md
└── exampleCode
│ ├── buildRelease.sh
│ ├── swift-weekly.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── swift-weekly.xccheckout
│ │ └── xcuserdata
│ │ │ └── vandadnp.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── vandadnp.xcuserdatad
│ │ └── xcschemes
│ │ ├── swift-weekly.xcscheme
│ │ └── xcschememanagement.plist
│ ├── swift-weekly
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Example.swift
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ └── ViewController.swift
│ └── swift-weeklyTests
│ ├── Info.plist
│ └── swift_weeklyTests.swift
├── issue04
├── README.md
└── exampleCode
│ ├── buildRelease.sh
│ ├── swift-weekly.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── swift-weekly.xccheckout
│ │ └── xcuserdata
│ │ │ └── vandadnp.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── vandadnp.xcuserdatad
│ │ └── xcschemes
│ │ ├── swift-weekly.xcscheme
│ │ └── xcschememanagement.plist
│ ├── swift-weekly
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Example.swift
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ └── ViewController.swift
│ └── swift-weeklyTests
│ ├── Info.plist
│ └── swift_weeklyTests.swift
├── issue05
├── README.md
└── exampleCode
│ ├── swift-weekly.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── swift-weekly.xccheckout
│ │ └── xcuserdata
│ │ │ └── vandadnp.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── vandadnp.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── swift-weekly.xcscheme
│ │ └── xcschememanagement.plist
│ ├── swift-weekly
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Boy.swift
│ ├── FluentSerialQueue.swift
│ ├── FluentUrlConnection.swift
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── NameBuilder.swift
│ └── ViewController.swift
│ └── swift-weeklyTests
│ ├── Info.plist
│ └── swift_weeklyTests.swift
├── issue06
├── README.md
└── exampleCode
│ ├── buildRelease.sh
│ ├── swift-weekly.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── swift-weekly.xccheckout
│ │ └── xcuserdata
│ │ │ └── vandadnp.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── vandadnp.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── swift-weekly.xcscheme
│ │ └── xcschememanagement.plist
│ ├── swift-weekly
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── Test.swift
│ └── ViewController.swift
│ └── swift-weeklyTests
│ ├── Info.plist
│ └── swift_weeklyTests.swift
├── issue07
├── README.md
└── exampleCode
│ ├── buildRelease.sh
│ ├── swift-weekly.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── swift-weekly.xccheckout
│ │ └── xcuserdata
│ │ │ └── vandadnp.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── vandadnp.xcuserdatad
│ │ └── xcschemes
│ │ ├── swift-weekly.xcscheme
│ │ └── xcschememanagement.plist
│ ├── swift-weekly
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ ├── 1.imageset
│ │ │ ├── 1.png
│ │ │ └── Contents.json
│ │ ├── 2.imageset
│ │ │ ├── 2.png
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ └── ViewController.swift
│ └── swift-weeklyTests
│ ├── Info.plist
│ └── swift_weeklyTests.swift
├── issue08
├── README.md
└── exampleCode
│ ├── buildRelease.sh
│ ├── swift-weekly.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── swift-weekly.xccheckout
│ │ └── xcuserdata
│ │ │ └── vandadnp.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── vandadnp.xcuserdatad
│ │ └── xcschemes
│ │ ├── swift-weekly.xcscheme
│ │ └── xcschememanagement.plist
│ ├── swift-weekly
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ └── ViewController.swift
│ └── swift-weeklyTests
│ ├── Info.plist
│ └── swift_weeklyTests.swift
├── issue09
├── README.md
└── exampleCode
│ ├── buildRelease.sh
│ ├── output.asm
│ ├── swift-weekly.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── swift-weekly.xccheckout
│ │ └── xcuserdata
│ │ │ └── vandadnp.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── vandadnp.xcuserdatad
│ │ └── xcschemes
│ │ ├── swift-weekly.xcscheme
│ │ └── xcschememanagement.plist
│ ├── swift-weekly
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ └── ViewController.swift
│ └── swift-weeklyTests
│ ├── Info.plist
│ └── swift_weeklyTests.swift
├── issue10
├── README.md
└── exampleCode
│ ├── buildRelease.sh
│ ├── swift-weekly.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── swift-weekly.xccheckout
│ │ └── xcuserdata
│ │ │ └── vandadnp.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── vandadnp.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── swift-weekly.xcscheme
│ │ └── xcschememanagement.plist
│ ├── swift-weekly
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── ViewController.swift
│ └── output.asm
│ └── swift-weeklyTests
│ ├── Info.plist
│ └── swift_weeklyTests.swift
├── issue11
├── README.md
└── exampleCode
│ ├── buildRelease.sh
│ ├── swift-weekly.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── swift-weekly.xccheckout
│ │ └── xcuserdata
│ │ │ └── vandadnp.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── vandadnp.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── swift-weekly.xcscheme
│ │ └── xcschememanagement.plist
│ ├── swift-weekly
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── ViewController.swift
│ └── output.asm
│ └── swift-weeklyTests
│ ├── Info.plist
│ └── swift_weeklyTests.swift
├── issue12
├── README.md
└── exampleCode
│ ├── buildRelease.sh
│ ├── swift-weekly.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── swift-weekly.xccheckout
│ │ └── xcuserdata
│ │ │ └── vandadnp.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── vandadnp.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── swift-weekly.xcscheme
│ │ └── xcschememanagement.plist
│ ├── swift-weekly
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── ObjcClass.h
│ ├── ObjcClass.m
│ ├── ObjcClass.o
│ ├── ViewController.swift
│ ├── arm.o
│ ├── arm.s
│ ├── both.o
│ ├── intel.o
│ ├── intel.s
│ └── swift-weekly-Bridging-Header.h
│ └── swift-weeklyTests
│ ├── Info.plist
│ └── swift_weeklyTests.swift
├── issue13
├── README.md
└── exampleCode
│ ├── buildRelease.sh
│ ├── swift-weekly.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── vandadnp.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── vandadnp.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
│ ├── swift-weekly
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── HighPriority.swift
│ ├── Info.plist
│ └── ViewController.swift
│ └── swift-weeklyTests
│ ├── Info.plist
│ └── swift_weeklyTests.swift
└── issue14
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | build.sh
3 | build/
4 | build/**
5 | build
6 | **/exampleCode/mac/
7 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Swift Weekly
2 | ============
3 |
4 | Swift Weekly is an exciting and new weekly magazine for Swift programming language enthusiasts.
5 |
6 | Here are the available issues:
7 |
8 | - [Issue 01 - Pointers](issue01/README.md)
9 | - [Issue 02 - The Swift Runtime (Part 1)](issue02/README.md)
10 | - [Issue 03 - The Swift Runtime (Part 2) - Enumerations](issue03/README.md)
11 | - [Issue 04 - The Swift Runtime (Part 3) - Operators](issue04/README.md)
12 | - [Issue 05 - The Builder Pattern and Fluent Interface](issue05/README.md)
13 | - [Issue 06 - The Swift Runtime (Part 4) - Generics](issue06/README.md)
14 | - [Issue 07 - The Swift Runtime (Part 5) - Operators](issue07/README.md)
15 | - [Issue 08 - The Swift Runtime (Part 6) - Type Casting](issue08/README.md)
16 | - [Issue 09 - The Swift Runtime (Part 7) - Subscripts](issue09/README.md)
17 | - [Issue 10 - The Swift Runtime (Part 8) - Switch Statement](issue10/README.md)
18 | - [Issue 11 - `@autoclosure`, `@inline`, `@noescape`, and `@noreturn` Keywords](issue11/README.md)
19 | - [Issue 12 - Adding Assembly Code to Swift](issue12/README.md)
20 | - [Issue 13 - Loops](issue13/README.md)
21 | - [Issue 14 - Generics (Part 1)](issue14/README.md)
22 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example01/swift-weekly-issue01-example01.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example01/swift-weekly-issue01-example01.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue01/exampleCode/swift-weekly-issue01-example01/swift-weekly-issue01-example01.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example01/swift-weekly-issue01-example01.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | swift-weekly-issue01-example01.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9D93874C19F3A45A00445A24
16 |
17 | primary
18 |
19 |
20 | 9D93876119F3A45A00445A24
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example01/swift-weekly-issue01-example01/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // swift-weekly-issue01-example01
4 | //
5 | // Created by Vandad NP on 10/19/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 | // You are free to submit your changes/additions/fixes through
9 | // GitHub's Pull-Request system.
10 | //
11 | // I do __not__ take any responsibility as to how and why or when you
12 | // use these example codes.
13 | //
14 | // Please feel free to share Swift Weekly with anybody who you might
15 | // think may enjoy them.
16 | //
17 | // Also feel free to contact me personally if you have any questions
18 | // or ideas for the next Swift Weekly
19 |
20 | import UIKit
21 |
22 | @UIApplicationMain
23 | class AppDelegate: UIResponder, UIApplicationDelegate {
24 |
25 | var window: UIWindow?
26 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
27 | return true
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example01/swift-weekly-issue01-example01/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example01/swift-weekly-issue01-example01/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" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example01/swift-weekly-issue01-example01/MyPlayground.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example01/swift-weekly-issue01-example01/MyPlayground.playground/section-1.swift:
--------------------------------------------------------------------------------
1 | //
2 | // You are free to submit your changes/additions/fixes through
3 | // GitHub's Pull-Request system.
4 | //
5 | // I do __not__ take any responsibility as to how and why or when you
6 | // use these example codes.
7 | //
8 | // Please feel free to share Swift Weekly with anybody who you might
9 | // think may enjoy them.
10 | //
11 | // Also feel free to contact me personally if you have any questions
12 | // or ideas for the next Swift Weekly
13 |
14 | var myInt = 10
15 | var ptr = UnsafeMutablePointer.initialize(&myInt)
16 | ptr(20)
17 | myInt // this is now 20
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example01/swift-weekly-issue01-example01/MyPlayground.playground/timeline.xctimeline:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example01/swift-weekly-issue01-example01/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // swift-weekly-issue01-example01
4 | //
5 | // Created by Vandad NP on 10/19/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 | // You are free to submit your changes/additions/fixes through
9 | // GitHub's Pull-Request system.
10 | //
11 | // I do __not__ take any responsibility as to how and why or when you
12 | // use these example codes.
13 | //
14 | // Please feel free to share Swift Weekly with anybody who you might
15 | // think may enjoy them.
16 | //
17 | // Also feel free to contact me personally if you have any questions
18 | // or ideas for the next Swift Weekly
19 |
20 | import UIKit
21 |
22 | class ViewController: UIViewController {
23 |
24 | override func viewDidLoad() {
25 | super.viewDidLoad()
26 |
27 | }
28 |
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example01/swift-weekly-issue01-example01Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.pixolity.ios.$(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 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example01/swift-weekly-issue01-example01Tests/swift_weekly_issue01_example01Tests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // swift_weekly_issue01_example01Tests.swift
3 | // swift-weekly-issue01-example01Tests
4 | //
5 | // Created by Vandad NP on 10/19/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class swift_weekly_issue01_example01Tests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example02/swift-weekly-issue01-example02.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example02/swift-weekly-issue01-example02.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue01/exampleCode/swift-weekly-issue01-example02/swift-weekly-issue01-example02.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example02/swift-weekly-issue01-example02.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | swift-weekly-issue01-example02.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9D93877A19F3A46600445A24
16 |
17 | primary
18 |
19 |
20 | 9D93878F19F3A46600445A24
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example02/swift-weekly-issue01-example02/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example02/swift-weekly-issue01-example02/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" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example02/swift-weekly-issue01-example02/MyPlayground.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example02/swift-weekly-issue01-example02/MyPlayground.playground/section-1.swift:
--------------------------------------------------------------------------------
1 | //
2 | // You are free to submit your changes/additions/fixes through
3 | // GitHub's Pull-Request system.
4 | //
5 | // I do __not__ take any responsibility as to how and why or when you
6 | // use these example codes.
7 | //
8 | // Please feel free to share Swift Weekly with anybody who you might
9 | // think may enjoy them.
10 | //
11 | // Also feel free to contact me personally if you have any questions
12 | // or ideas for the next Swift Weekly
13 |
14 | // allocate one integer block
15 | var myPointer = UnsafeMutablePointer.alloc(1)
16 | // change its value
17 | myPointer.memory = 1_234
18 | let myInteger = myPointer.memory
19 | // myInteger = 1234
20 | myPointer.destroy()
21 | // now get rid of the pointer's memory
22 | myPointer.dealloc(1)
23 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example02/swift-weekly-issue01-example02/MyPlayground.playground/timeline.xctimeline:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example02/swift-weekly-issue01-example02/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // swift-weekly-issue01-example02
4 | //
5 | // Created by Vandad NP on 10/19/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 | // You are free to submit your changes/additions/fixes through
9 | // GitHub's Pull-Request system.
10 | //
11 | // I do __not__ take any responsibility as to how and why or when you
12 | // use these example codes.
13 | //
14 | // Please feel free to share Swift Weekly with anybody who you might
15 | // think may enjoy them.
16 | //
17 | // Also feel free to contact me personally if you have any questions
18 | // or ideas for the next Swift Weekly
19 |
20 | import UIKit
21 |
22 | class ViewController: UIViewController {
23 |
24 | override func viewDidLoad() {
25 | super.viewDidLoad()
26 | // Do any additional setup after loading the view, typically from a nib.
27 | }
28 |
29 | override func didReceiveMemoryWarning() {
30 | super.didReceiveMemoryWarning()
31 | // Dispose of any resources that can be recreated.
32 | }
33 |
34 |
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example02/swift-weekly-issue01-example02Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.pixolity.ios.$(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 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example02/swift-weekly-issue01-example02Tests/swift_weekly_issue01_example02Tests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // swift_weekly_issue01_example02Tests.swift
3 | // swift-weekly-issue01-example02Tests
4 | //
5 | // Created by Vandad NP on 10/19/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class swift_weekly_issue01_example02Tests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example03/swift-weekly-issue01-example03.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example03/swift-weekly-issue01-example03.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue01/exampleCode/swift-weekly-issue01-example03/swift-weekly-issue01-example03.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example03/swift-weekly-issue01-example03.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | swift-weekly-issue01-example03.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9D9387A819F3A46F00445A24
16 |
17 | primary
18 |
19 |
20 | 9D9387BD19F3A46F00445A24
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example03/swift-weekly-issue01-example03/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example03/swift-weekly-issue01-example03/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" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example03/swift-weekly-issue01-example03/MyPlayground.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example03/swift-weekly-issue01-example03/MyPlayground.playground/section-1.swift:
--------------------------------------------------------------------------------
1 | //
2 | // You are free to submit your changes/additions/fixes through
3 | // GitHub's Pull-Request system.
4 | //
5 | // I do __not__ take any responsibility as to how and why or when you
6 | // use these example codes.
7 | //
8 | // Please feel free to share Swift Weekly with anybody who you might
9 | // think may enjoy them.
10 | //
11 | // Also feel free to contact me personally if you have any questions
12 | // or ideas for the next Swift Weekly
13 |
14 | var myArray = [10, 20, 30, 40]
15 | var arrayPtr = UnsafeMutableBufferPointer(start: &myArray, count: myArray.count)
16 | var base = arrayPtr.baseAddress as UnsafeMutablePointer
17 | base.memory // 10
18 | base.memory = 100 // change the value of the first element in the array
19 | myArray // 100, 20, 30, 40
20 | // move the array forward by one element
21 | base = base.successor()
22 | base.memory // 20 (second item in the array)
23 | // add the value of myArray[1] to myArray[0] and put it in myArray[1]
24 | base.memory = base.memory + base.predecessor().memory
25 | myArray // 100, 120, 30, 40
26 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example03/swift-weekly-issue01-example03/MyPlayground.playground/timeline.xctimeline:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example03/swift-weekly-issue01-example03/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // swift-weekly-issue01-example03
4 | //
5 | // Created by Vandad NP on 10/19/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 | // You are free to submit your changes/additions/fixes through
9 | // GitHub's Pull-Request system.
10 | //
11 | // I do __not__ take any responsibility as to how and why or when you
12 | // use these example codes.
13 | //
14 | // Please feel free to share Swift Weekly with anybody who you might
15 | // think may enjoy them.
16 | //
17 | // Also feel free to contact me personally if you have any questions
18 | // or ideas for the next Swift Weekly
19 |
20 | import UIKit
21 |
22 | class ViewController: UIViewController {
23 |
24 | override func viewDidLoad() {
25 | super.viewDidLoad()
26 | // Do any additional setup after loading the view, typically from a nib.
27 | }
28 |
29 | override func didReceiveMemoryWarning() {
30 | super.didReceiveMemoryWarning()
31 | // Dispose of any resources that can be recreated.
32 | }
33 |
34 |
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example03/swift-weekly-issue01-example03Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.pixolity.ios.$(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 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example03/swift-weekly-issue01-example03Tests/swift_weekly_issue01_example03Tests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // swift_weekly_issue01_example03Tests.swift
3 | // swift-weekly-issue01-example03Tests
4 | //
5 | // Created by Vandad NP on 10/19/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class swift_weekly_issue01_example03Tests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example04/swift-weekly-issue01-example04.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example04/swift-weekly-issue01-example04.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue01/exampleCode/swift-weekly-issue01-example04/swift-weekly-issue01-example04.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example04/swift-weekly-issue01-example04.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | swift-weekly-issue01-example04.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9D9387D619F3A47500445A24
16 |
17 | primary
18 |
19 |
20 | 9D9387EB19F3A47600445A24
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example04/swift-weekly-issue01-example04/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example04/swift-weekly-issue01-example04/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" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example04/swift-weekly-issue01-example04/MyPlayground.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example04/swift-weekly-issue01-example04/MyPlayground.playground/section-1.swift:
--------------------------------------------------------------------------------
1 | //
2 | // You are free to submit your changes/additions/fixes through
3 | // GitHub's Pull-Request system.
4 | //
5 | // I do __not__ take any responsibility as to how and why or when you
6 | // use these example codes.
7 | //
8 | // Please feel free to share Swift Weekly with anybody who you might
9 | // think may enjoy them.
10 | //
11 | // Also feel free to contact me personally if you have any questions
12 | // or ideas for the next Swift Weekly
13 |
14 | struct Person{
15 | var firstName: String
16 | var lastName: String
17 | }
18 |
19 | var fooPtr = UnsafeMutablePointer.alloc(1)
20 | fooPtr.initialize(Person(firstName: "Vandad", lastName: "Nahavandipoor"))
21 | fooPtr.memory.firstName // will print "Vandad"
22 | // change the last name
23 | fooPtr.memory.lastName = "Lastname"
24 |
25 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example04/swift-weekly-issue01-example04/MyPlayground.playground/timeline.xctimeline:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example04/swift-weekly-issue01-example04/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // swift-weekly-issue01-example04
4 | //
5 | // Created by Vandad NP on 10/19/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 | // You are free to submit your changes/additions/fixes through
9 | // GitHub's Pull-Request system.
10 | //
11 | // I do __not__ take any responsibility as to how and why or when you
12 | // use these example codes.
13 | //
14 | // Please feel free to share Swift Weekly with anybody who you might
15 | // think may enjoy them.
16 | //
17 | // Also feel free to contact me personally if you have any questions
18 | // or ideas for the next Swift Weekly
19 |
20 | import UIKit
21 |
22 | class ViewController: UIViewController {
23 |
24 | override func viewDidLoad() {
25 | super.viewDidLoad()
26 | // Do any additional setup after loading the view, typically from a nib.
27 | }
28 |
29 | override func didReceiveMemoryWarning() {
30 | super.didReceiveMemoryWarning()
31 | // Dispose of any resources that can be recreated.
32 | }
33 |
34 |
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example04/swift-weekly-issue01-example04Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.pixolity.ios.$(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 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example04/swift-weekly-issue01-example04Tests/swift_weekly_issue01_example04Tests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // swift_weekly_issue01_example04Tests.swift
3 | // swift-weekly-issue01-example04Tests
4 | //
5 | // Created by Vandad NP on 10/19/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class swift_weekly_issue01_example04Tests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example05/swift-weekly-issue01-example05.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example05/swift-weekly-issue01-example05.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue01/exampleCode/swift-weekly-issue01-example05/swift-weekly-issue01-example05.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example05/swift-weekly-issue01-example05.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | swift-weekly-issue01-example05.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9DD3259419FD4DE100C25A48
16 |
17 | primary
18 |
19 |
20 | 9DD325A919FD4DE100C25A48
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example05/swift-weekly-issue01-example05/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example05/swift-weekly-issue01-example05/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" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example05/swift-weekly-issue01-example05/MyPlayground.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example05/swift-weekly-issue01-example05/MyPlayground.playground/section-1.swift:
--------------------------------------------------------------------------------
1 | //
2 | // You are free to submit your changes/additions/fixes through
3 | // GitHub's Pull-Request system.
4 | //
5 | // I do __not__ take any responsibility as to how and why or when you
6 | // use these example codes.
7 | //
8 | // Please feel free to share Swift Weekly with anybody who you might
9 | // think may enjoy them.
10 | //
11 | // Also feel free to contact me personally if you have any questions
12 | // or ideas for the next Swift Weekly
13 |
14 | import Foundation
15 |
16 | let array:NSArray = ["Name", "Last name", "Age", "Sex"]
17 | array.enumerateObjectsUsingBlock {
18 | (obj: AnyObject!, index: Int,
19 | stop: UnsafeMutablePointer) -> Void in
20 | if let myString = obj as? String{
21 | if myString == "Last name"{
22 | println("Found the last name")
23 | stop.memory = true
24 | }
25 | }
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example05/swift-weekly-issue01-example05/MyPlayground.playground/timeline.xctimeline:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example05/swift-weekly-issue01-example05/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // swift-weekly-issue01-example05
4 | //
5 | // Created by Vandad NP on 10/26/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 | // You are free to submit your changes/additions/fixes through
9 | // GitHub's Pull-Request system.
10 | //
11 | // I do __not__ take any responsibility as to how and why or when you
12 | // use these example codes.
13 | //
14 | // Please feel free to share Swift Weekly with anybody who you might
15 | // think may enjoy them.
16 | //
17 | // Also feel free to contact me personally if you have any questions
18 | // or ideas for the next Swift Weekly
19 |
20 | import UIKit
21 |
22 | class ViewController: UIViewController {
23 |
24 | override func viewDidLoad() {
25 | super.viewDidLoad()
26 | // Do any additional setup after loading the view, typically from a nib.
27 | }
28 |
29 | override func didReceiveMemoryWarning() {
30 | super.didReceiveMemoryWarning()
31 | // Dispose of any resources that can be recreated.
32 | }
33 |
34 |
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example05/swift-weekly-issue01-example05Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.pixolity.ios.$(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 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example05/swift-weekly-issue01-example05Tests/swift_weekly_issue01_example05Tests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // swift_weekly_issue01_example05Tests.swift
3 | // swift-weekly-issue01-example05Tests
4 | //
5 | // Created by Vandad NP on 10/26/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class swift_weekly_issue01_example05Tests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example06/swift-weekly-issue01-example06.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example06/swift-weekly-issue01-example06.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue01/exampleCode/swift-weekly-issue01-example06/swift-weekly-issue01-example06.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example06/swift-weekly-issue01-example06.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | swift-weekly-issue01-example06.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9DD325C319FD4E2500C25A48
16 |
17 | primary
18 |
19 |
20 | 9DD325D819FD4E2500C25A48
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example06/swift-weekly-issue01-example06/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example06/swift-weekly-issue01-example06/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" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example06/swift-weekly-issue01-example06/MyPlayground.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example06/swift-weekly-issue01-example06/MyPlayground.playground/section-1.swift:
--------------------------------------------------------------------------------
1 | //
2 | // You are free to submit your changes/additions/fixes through
3 | // GitHub's Pull-Request system.
4 | //
5 | // I do __not__ take any responsibility as to how and why or when you
6 | // use these example codes.
7 | //
8 | // Please feel free to share Swift Weekly with anybody who you might
9 | // think may enjoy them.
10 | //
11 | // Also feel free to contact me personally if you have any questions
12 | // or ideas for the next Swift Weekly
13 |
14 | import Foundation
15 |
16 | func invertObjCBoolean(var bool: UnsafeMutablePointer){
17 | bool.memory = ObjCBool(!bool.memory.boolValue)
18 | }
19 | var myBool = true as ObjCBool
20 | invertObjCBoolean(&myBool)
21 | myBool // myBool is now false is false
22 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example06/swift-weekly-issue01-example06/MyPlayground.playground/timeline.xctimeline:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example06/swift-weekly-issue01-example06/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // swift-weekly-issue01-example06
4 | //
5 | // Created by Vandad NP on 10/26/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 | // You are free to submit your changes/additions/fixes through
9 | // GitHub's Pull-Request system.
10 | //
11 | // I do __not__ take any responsibility as to how and why or when you
12 | // use these example codes.
13 | //
14 | // Please feel free to share Swift Weekly with anybody who you might
15 | // think may enjoy them.
16 | //
17 | // Also feel free to contact me personally if you have any questions
18 | // or ideas for the next Swift Weekly
19 |
20 | import UIKit
21 |
22 | class ViewController: UIViewController {
23 |
24 | override func viewDidLoad() {
25 | super.viewDidLoad()
26 | // Do any additional setup after loading the view, typically from a nib.
27 | }
28 |
29 | override func didReceiveMemoryWarning() {
30 | super.didReceiveMemoryWarning()
31 | // Dispose of any resources that can be recreated.
32 | }
33 |
34 |
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example06/swift-weekly-issue01-example06Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.pixolity.ios.$(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 |
--------------------------------------------------------------------------------
/issue01/exampleCode/swift-weekly-issue01-example06/swift-weekly-issue01-example06Tests/swift_weekly_issue01_example06Tests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // swift_weekly_issue01_example06Tests.swift
3 | // swift-weekly-issue01-example06Tests
4 | //
5 | // Created by Vandad NP on 10/26/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class swift_weekly_issue01_example06Tests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/issue01/swift-weekly-issue-01.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue01/swift-weekly-issue-01.docx
--------------------------------------------------------------------------------
/issue01/swift-weekly-issue-01.epub:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue01/swift-weekly-issue-01.epub
--------------------------------------------------------------------------------
/issue01/swift-weekly-issue-01.pages:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue01/swift-weekly-issue-01.pages
--------------------------------------------------------------------------------
/issue01/swift-weekly-issue-01.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue01/swift-weekly-issue-01.pdf
--------------------------------------------------------------------------------
/issue02/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/issue02/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcshareddata/swift-weekly.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 390B886F-07AB-4400-A2D6-C4857948FCCA
9 | IDESourceControlProjectName
10 | swift-weekly
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
14 | github.com:vandadnp/swift-weekly.git
15 |
16 | IDESourceControlProjectPath
17 | issue02/exampleCode/swift-weekly.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
21 | ../../../..
22 |
23 | IDESourceControlProjectURL
24 | github.com:vandadnp/swift-weekly.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
36 | IDESourceControlWCCName
37 | swift-weekly
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/issue02/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue02/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/issue02/exampleCode/swift-weekly.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | swift-weekly.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9DB9A00A1A063E6E00D451B3
16 |
17 | primary
18 |
19 |
20 | 9DB9A01F1A063E6E00D451B3
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/issue02/exampleCode/swift-weekly/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // swift-weekly
4 | //
5 | // Created by Vandad NP on 11/2/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 | func example1(){
17 | let a = 0xabcdefa
18 | println(a)
19 | let b = 0xabcdefb
20 | println(b)
21 | }
22 |
23 | func example2(){
24 | let a = 0xabcdefa
25 | println(0xabcdefa)
26 | }
27 |
28 | func example3(){
29 | let a = 0xabcdefa
30 | var b = 0xabcdefb
31 | let c = a + b
32 | }
33 |
34 | func example4(){
35 | let intConstant = 0xabcdefa
36 | let intVariable = 0xabcdefb
37 |
38 | let boolConstant = true
39 | var boolVariable = false
40 |
41 | let doubleConstant = 1.23
42 | let doubleVariable = 2.34
43 |
44 | let floatConstant:Float = 1.23
45 | let floatVariable: Float = 2.34
46 | }
47 |
48 | func example5(){
49 | // let person = Person(age: 30)
50 | }
51 |
52 | func example6(){
53 | var person = Person()
54 | person.age = 0xabcdefa
55 | person.sex = 0xabcdefb
56 | person.numberOfChildren = 0xabcdefc
57 | }
58 |
59 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
60 | return true
61 | }
62 |
63 | }
64 |
65 |
--------------------------------------------------------------------------------
/issue02/exampleCode/swift-weekly/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/issue02/exampleCode/swift-weekly/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" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/issue02/exampleCode/swift-weekly/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.pixolity.ios.$(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 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/issue02/exampleCode/swift-weekly/Person.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Person.swift
3 | // swift-weekly
4 | //
5 | // Created by Vandad NP on 11/2/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | struct Person{
12 | var age: Int = 0
13 | var sex: Int = 0
14 | var numberOfChildren: Int = 0
15 |
16 | mutating func setAge(paramAge: Int){
17 | age = paramAge
18 | }
19 |
20 | mutating func setSex(paramSex: Int){
21 | sex = paramSex
22 | }
23 |
24 | mutating func setNumberOfChildren(paramNumberOfChildren: Int){
25 | numberOfChildren = paramNumberOfChildren
26 | }
27 |
28 | }
--------------------------------------------------------------------------------
/issue02/exampleCode/swift-weekly/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // swift-weekly
4 | //
5 | // Created by Vandad NP on 11/2/14.
6 | // Copyright (c) 2014 Pixolity Ltd. 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 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/issue02/exampleCode/swift-weeklyTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.pixolity.ios.$(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 |
--------------------------------------------------------------------------------
/issue02/exampleCode/swift-weeklyTests/swift_weeklyTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // swift_weeklyTests.swift
3 | // swift-weeklyTests
4 | //
5 | // Created by Vandad NP on 11/2/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class swift_weeklyTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/issue03/exampleCode/buildRelease.sh:
--------------------------------------------------------------------------------
1 | rm -rf build
2 | xcrun xcodebuild -sdk iphonesimulator -configuration Release -arch x86_64
3 | rm -rf ~/Desktop/output/
4 | mkdir ~/Desktop/output
5 | cp -r build/Release-iphonesimulator/swift-weekly.app ~/Desktop/output/
6 | cp -r build/Release-iphonesimulator/swift-weekly.app.dSYM ~/Desktop/output/
7 |
8 |
--------------------------------------------------------------------------------
/issue03/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/issue03/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcshareddata/swift-weekly.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 39B940EA-A7F5-42DD-B12E-DACC79F04E50
9 | IDESourceControlProjectName
10 | swift-weekly
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
14 | github.com:vandadnp/swift-weekly.git
15 |
16 | IDESourceControlProjectPath
17 | issue03/exampleCode/swift-weekly.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
21 | ../../../..
22 |
23 | IDESourceControlProjectURL
24 | github.com:vandadnp/swift-weekly.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
36 | IDESourceControlWCCName
37 | swift-weekly
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/issue03/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue03/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/issue03/exampleCode/swift-weekly.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | swift-weekly.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9DF87C871A0E0C1F00FDA984
16 |
17 | primary
18 |
19 |
20 | 9DF87C9C1A0E0C1F00FDA984
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/issue03/exampleCode/swift-weekly/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // swift-weekly
4 | //
5 | // Created by Vandad NP on 11/8/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
17 | // Override point for customization after application launch.
18 | return true
19 | }
20 |
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/issue03/exampleCode/swift-weekly/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/issue03/exampleCode/swift-weekly/Example.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Example.swift
3 | // swift-weekly
4 | //
5 | // Created by Vandad NP on 11/8/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | enum CarType: Int{
12 | case CarTypeSaloon = 0xabcdefa
13 | case CarTypeHatchback
14 | }
15 |
16 | enum MaleNames: String{
17 | case Vandad = "Vandad"
18 | case Kim = "Kim"
19 | }
20 |
21 | enum FemaleNames: String{
22 | case Sara = "Sara"
23 | case Kim = "Kim"
24 | }
25 |
26 |
27 |
28 | struct Example{
29 |
30 | func example1(){
31 |
32 | let saloon = CarType.CarTypeSaloon
33 | println(saloon.rawValue)
34 |
35 | let hatchback = CarType.CarTypeHatchback
36 | println(hatchback.rawValue)
37 |
38 | }
39 |
40 | func example2(){
41 |
42 | println(MaleNames.Vandad)
43 | println(MaleNames.Kim)
44 | println(FemaleNames.Sara)
45 | println(FemaleNames.Kim)
46 |
47 | }
48 |
49 | func carType() -> CarType{
50 | return .CarTypeHatchback
51 | }
52 |
53 | func example3(){
54 |
55 | let type = carType()
56 |
57 | switch type{
58 | case .CarTypeSaloon:
59 | println(0xaaaaaaaa)
60 | case .CarTypeHatchback:
61 | println(0xbbbbbbbb)
62 | default:
63 | println(0xcccccccc)
64 | }
65 |
66 | }
67 |
68 | }
--------------------------------------------------------------------------------
/issue03/exampleCode/swift-weekly/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" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/issue03/exampleCode/swift-weekly/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.pixolity.ios.$(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 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/issue03/exampleCode/swift-weekly/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // swift-weekly
4 | //
5 | // Created by Vandad NP on 11/8/14.
6 | // Copyright (c) 2014 Pixolity Ltd. 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 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/issue03/exampleCode/swift-weeklyTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.pixolity.ios.$(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 |
--------------------------------------------------------------------------------
/issue03/exampleCode/swift-weeklyTests/swift_weeklyTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // swift_weeklyTests.swift
3 | // swift-weeklyTests
4 | //
5 | // Created by Vandad NP on 11/8/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class swift_weeklyTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/issue04/exampleCode/buildRelease.sh:
--------------------------------------------------------------------------------
1 | rm -rf build
2 | xcrun xcodebuild -sdk iphonesimulator -configuration Release -arch x86_64
3 | rm -rf ~/Desktop/output/
4 | mkdir ~/Desktop/output
5 | cp -r build/Release-iphonesimulator/swift-weekly.app ~/Desktop/output/
6 | cp -r build/Release-iphonesimulator/swift-weekly.app.dSYM ~/Desktop/output/
7 | open ~/Desktop/output/
8 |
9 |
--------------------------------------------------------------------------------
/issue04/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/issue04/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcshareddata/swift-weekly.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 7405B515-C51C-48DD-B446-811AF8294340
9 | IDESourceControlProjectName
10 | swift-weekly
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
14 | github.com:vandadnp/swift-weekly.git
15 |
16 | IDESourceControlProjectPath
17 | issue04/exampleCode/swift-weekly.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
21 | ../../../..
22 |
23 | IDESourceControlProjectURL
24 | github.com:vandadnp/swift-weekly.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
36 | IDESourceControlWCCName
37 | swift-weekly
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/issue04/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue04/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/issue04/exampleCode/swift-weekly.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | swift-weekly.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9D4F02F61A173422003B2DAD
16 |
17 | primary
18 |
19 |
20 | 9D4F030B1A173422003B2DAD
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/issue04/exampleCode/swift-weekly/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/issue04/exampleCode/swift-weekly/Example.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Example.swift
3 | // swift-weekly
4 | //
5 | // Created by Vandad NP on 11/15/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | class Example{
12 |
13 | func example1(){
14 |
15 | let int1 = 0xabcdefa
16 | let int2 = 0xabcdefb
17 | let int3 = int1 + int2
18 | println(int3)
19 |
20 | let int4 = 0xabcdefa + 0xabcdefb
21 | println(int4)
22 |
23 | }
24 |
25 | func example2(){
26 |
27 | var int1 = 0xabcdefa
28 | var int2 = 0xabcdefb
29 | var int3 = int1 + int2
30 | println(int3)
31 |
32 | var int4 = 0xabcdefa + 0xabcdefb
33 | println(int4)
34 |
35 | }
36 |
37 | func randomInt() -> Int{
38 | return Int(arc4random_uniform(UInt32.max))
39 | }
40 |
41 | func example3(){
42 |
43 | var int1 = randomInt()
44 | var int2 = randomInt()
45 | var int3 = int1 + int2
46 |
47 | }
48 |
49 | func example4(){
50 |
51 | let int1 = randomInt()
52 | let int2 = randomInt()
53 | let int3 = int1 - int2
54 | println(int3)
55 |
56 | }
57 |
58 | func example5(){
59 |
60 | let int1 = random()
61 | let int2 = random()
62 | let int3 = int1 > int2 ? 0xabcdefa : 0xabcdefb
63 | println(int3)
64 |
65 | }
66 |
67 | func example6(){
68 | let bool = Bool(random()) ? 0xabcdefa : 0xabcdefb
69 | println(bool)
70 | }
71 |
72 | }
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/issue04/exampleCode/swift-weekly/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" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/issue04/exampleCode/swift-weekly/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.pixolity.ios.$(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 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/issue04/exampleCode/swift-weekly/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // swift-weekly
4 | //
5 | // Created by Vandad NP on 11/15/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/issue04/exampleCode/swift-weeklyTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.pixolity.ios.$(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 |
--------------------------------------------------------------------------------
/issue04/exampleCode/swift-weeklyTests/swift_weeklyTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // swift_weeklyTests.swift
3 | // swift-weeklyTests
4 | //
5 | // Created by Vandad NP on 11/15/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class swift_weeklyTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/issue05/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/issue05/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue05/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/issue05/exampleCode/swift-weekly.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/issue05/exampleCode/swift-weekly.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | swift-weekly.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9DC5B1BC1A1F54570064556E
16 |
17 | primary
18 |
19 |
20 | 9DC5B1D11A1F54570064556E
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/issue05/exampleCode/swift-weekly/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/issue05/exampleCode/swift-weekly/Boy.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Boy.swift
3 | // swift-weekly
4 | //
5 | // Created by Vandad NP on 11/21/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | class Boy{
12 |
13 | func jump() -> Self{
14 | println("Jumping...")
15 | return self
16 | }
17 |
18 | func run() -> Self{
19 | println("Running...")
20 | return self
21 | }
22 |
23 | func restFor(seconds: Int) -> Self{
24 | println("Resting for \(seconds) seconds")
25 | return self
26 | }
27 |
28 | func stop() -> Self{
29 | println("Stopping")
30 | return self
31 | }
32 |
33 | }
--------------------------------------------------------------------------------
/issue05/exampleCode/swift-weekly/FluentSerialQueue.swift:
--------------------------------------------------------------------------------
1 | //
2 | // FluentQueue.swift
3 | // swift-weekly
4 | //
5 | // Created by Vandad NP on 11/21/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | typealias FluentQueueTask = () -> ()
12 |
13 | class FluentSerialQueue{
14 |
15 | private struct FluentTask{
16 | var block: FluentQueueTask
17 | var onBackgroundThread: Bool
18 | }
19 |
20 | private lazy var tasks: [FluentTask] = {
21 | return [FluentTask]()
22 | }()
23 |
24 | private lazy var queue = dispatch_queue_create("com.pixolity.serialQueue", DISPATCH_QUEUE_SERIAL)
25 |
26 | func onBackround(task: FluentQueueTask) -> Self{
27 | tasks.append(FluentTask(block: task, onBackgroundThread: true))
28 | return self
29 | }
30 |
31 | func onMainThread(task: FluentQueueTask) -> Self{
32 | tasks.append(FluentTask(block: task, onBackgroundThread: false))
33 | return self
34 | }
35 |
36 | func start() -> Self{
37 |
38 | for task in tasks{
39 |
40 | if task.onBackgroundThread{
41 | dispatch_async(queue, task.block)
42 | }
43 | else {
44 |
45 | dispatch_async(queue, { () -> Void in
46 | let sema = dispatch_semaphore_create(0)
47 | dispatch_async(dispatch_get_main_queue(), { () -> Void in
48 | task.block()
49 | dispatch_semaphore_signal(sema)
50 | })
51 | dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER)
52 | })
53 |
54 | }
55 |
56 | }
57 |
58 | return self
59 | }
60 |
61 | }
--------------------------------------------------------------------------------
/issue05/exampleCode/swift-weekly/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" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/issue05/exampleCode/swift-weekly/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.pixolity.ios.$(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 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/issue05/exampleCode/swift-weekly/NameBuilder.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UrlBuilder.swift
3 | // swift-weekly
4 | //
5 | // Created by Vandad NP on 11/21/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | class NameBuilder{
12 |
13 | private var firstName = ""
14 | private var lastName = ""
15 |
16 | func setFirstName(f: String){
17 | firstName = f
18 | }
19 |
20 | func setLastName(l: String){
21 | lastName = l
22 | }
23 |
24 | func toString() -> String{
25 | return "\(firstName) \(lastName)"
26 | }
27 |
28 | }
--------------------------------------------------------------------------------
/issue05/exampleCode/swift-weekly/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // swift-weekly
4 | //
5 | // Created by Vandad NP on 11/21/14.
6 | // Copyright (c) 2014 Pixolity Ltd. 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 |
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/issue05/exampleCode/swift-weeklyTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.pixolity.ios.$(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 |
--------------------------------------------------------------------------------
/issue05/exampleCode/swift-weeklyTests/swift_weeklyTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // swift_weeklyTests.swift
3 | // swift-weeklyTests
4 | //
5 | // Created by Vandad NP on 11/21/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class swift_weeklyTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/issue06/exampleCode/buildRelease.sh:
--------------------------------------------------------------------------------
1 | rm -rf build
2 | xcrun xcodebuild -sdk iphonesimulator -configuration Release -arch x86_64
3 | rm -rf ~/Desktop/output/
4 | mkdir ~/Desktop/output
5 | cp -r build/Release-iphonesimulator/swift-weekly.app ~/Desktop/output/
6 | cp -r build/Release-iphonesimulator/swift-weekly.app.dSYM ~/Desktop/output/
7 | open ~/Desktop/output/
8 |
9 |
--------------------------------------------------------------------------------
/issue06/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/issue06/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcshareddata/swift-weekly.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | FFF0E665-0BD3-418A-86D9-B98F47F49FF3
9 | IDESourceControlProjectName
10 | swift-weekly
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
14 | github.com:vandadnp/swift-weekly.git
15 |
16 | IDESourceControlProjectPath
17 | issue06/exampleCode/swift-weekly.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
21 | ../../../..
22 |
23 | IDESourceControlProjectURL
24 | github.com:vandadnp/swift-weekly.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
36 | IDESourceControlWCCName
37 | swift-weekly
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/issue06/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue06/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/issue06/exampleCode/swift-weekly.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/issue06/exampleCode/swift-weekly.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | swift-weekly.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9D3BFDD11A2B985800D73E21
16 |
17 | primary
18 |
19 |
20 | 9D3BFDE61A2B985800D73E21
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/issue06/exampleCode/swift-weekly/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/issue06/exampleCode/swift-weekly/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" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/issue06/exampleCode/swift-weekly/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.pixolity.ios.$(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 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/issue06/exampleCode/swift-weekly/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // swift-weekly
4 | //
5 | // Created by Vandad NP on 11/30/14.
6 | // Copyright (c) 2014 Pixolity Ltd. 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 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/issue06/exampleCode/swift-weeklyTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.pixolity.ios.$(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 |
--------------------------------------------------------------------------------
/issue06/exampleCode/swift-weeklyTests/swift_weeklyTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // swift_weeklyTests.swift
3 | // swift-weeklyTests
4 | //
5 | // Created by Vandad NP on 11/30/14.
6 | // Copyright (c) 2014 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class swift_weeklyTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/issue07/exampleCode/buildRelease.sh:
--------------------------------------------------------------------------------
1 | rm -rf build
2 | xcrun xcodebuild -sdk iphonesimulator -configuration Release -arch x86_64
3 | rm -rf ~/Desktop/output/
4 | mkdir ~/Desktop/output
5 | cp -r build/Release-iphonesimulator/swift-weekly.app ~/Desktop/output/
6 | cp -r build/Release-iphonesimulator/swift-weekly.app.dSYM ~/Desktop/output/
7 | open ~/Desktop/output/
8 |
9 |
--------------------------------------------------------------------------------
/issue07/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/issue07/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcshareddata/swift-weekly.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 1C9A8DF1-8785-449A-8532-6A6A13991328
9 | IDESourceControlProjectName
10 | swift-weekly
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
14 | github.com:vandadnp/swift-weekly.git
15 |
16 | IDESourceControlProjectPath
17 | issue07/exampleCode/swift-weekly.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
21 | ../../../..
22 |
23 | IDESourceControlProjectURL
24 | github.com:vandadnp/swift-weekly.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
36 | IDESourceControlWCCName
37 | swift-weekly
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/issue07/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue07/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/issue07/exampleCode/swift-weekly.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | swift-weekly.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9DB1E3491A48323C006CE680
16 |
17 | primary
18 |
19 |
20 | 9DB1E35E1A48323C006CE680
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/issue07/exampleCode/swift-weekly/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/issue07/exampleCode/swift-weekly/Images.xcassets/1.imageset/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue07/exampleCode/swift-weekly/Images.xcassets/1.imageset/1.png
--------------------------------------------------------------------------------
/issue07/exampleCode/swift-weekly/Images.xcassets/1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "1.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/issue07/exampleCode/swift-weekly/Images.xcassets/2.imageset/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue07/exampleCode/swift-weekly/Images.xcassets/2.imageset/2.png
--------------------------------------------------------------------------------
/issue07/exampleCode/swift-weekly/Images.xcassets/2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "2.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/issue07/exampleCode/swift-weekly/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" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/issue07/exampleCode/swift-weekly/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | Pixolity-Ltd..$(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 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/issue07/exampleCode/swift-weeklyTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | Pixolity-Ltd..$(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 |
--------------------------------------------------------------------------------
/issue07/exampleCode/swift-weeklyTests/swift_weeklyTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // swift_weeklyTests.swift
3 | // swift-weeklyTests
4 | //
5 | // Created by vandadnp on 12/22/14.
6 | // Copyright (c) 2014 com.pixolity.ios. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class swift_weeklyTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/issue08/exampleCode/buildRelease.sh:
--------------------------------------------------------------------------------
1 | rm -rf build
2 | xcrun xcodebuild -sdk iphonesimulator -configuration Release -arch x86_64
3 | rm -rf ~/Desktop/output/
4 | mkdir ~/Desktop/output
5 | cp -r build/Release-iphonesimulator/swift-weekly.app ~/Desktop/output/
6 | cp -r build/Release-iphonesimulator/swift-weekly.app.dSYM ~/Desktop/output/
7 | open ~/Desktop/output/
8 |
9 |
--------------------------------------------------------------------------------
/issue08/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/issue08/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcshareddata/swift-weekly.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 1C9A8DF1-8785-449A-8532-6A6A13991328
9 | IDESourceControlProjectName
10 | swift-weekly
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
14 | github.com:vandadnp/swift-weekly.git
15 |
16 | IDESourceControlProjectPath
17 | issue08/exampleCode/swift-weekly.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
21 | ../../../..
22 |
23 | IDESourceControlProjectURL
24 | github.com:vandadnp/swift-weekly.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
36 | IDESourceControlWCCName
37 | swift-weekly
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/issue08/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue08/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/issue08/exampleCode/swift-weekly.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | swift-weekly.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9DB1E3491A48323C006CE680
16 |
17 | primary
18 |
19 |
20 | 9DB1E35E1A48323C006CE680
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/issue08/exampleCode/swift-weekly/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/issue08/exampleCode/swift-weekly/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" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/issue08/exampleCode/swift-weekly/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | Pixolity-Ltd..$(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 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/issue08/exampleCode/swift-weeklyTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | Pixolity-Ltd..$(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 |
--------------------------------------------------------------------------------
/issue08/exampleCode/swift-weeklyTests/swift_weeklyTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // swift_weeklyTests.swift
3 | // swift-weeklyTests
4 | //
5 | // Created by vandadnp on 12/22/14.
6 | // Copyright (c) 2014 com.pixolity.ios. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class swift_weeklyTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/issue09/exampleCode/buildRelease.sh:
--------------------------------------------------------------------------------
1 | rm -rf build
2 | xcrun xcodebuild -sdk iphonesimulator -configuration Release -arch x86_64
3 | rm -rf ~/Desktop/output/
4 | mkdir ~/Desktop/output
5 | cp -r build/Release-iphonesimulator/swift-weekly.app ~/Desktop/output/
6 | cp -r build/Release-iphonesimulator/swift-weekly.app.dSYM ~/Desktop/output/
7 | open ~/Desktop/output/
8 |
9 |
--------------------------------------------------------------------------------
/issue09/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/issue09/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcshareddata/swift-weekly.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 1C9A8DF1-8785-449A-8532-6A6A13991328
9 | IDESourceControlProjectName
10 | swift-weekly
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
14 | github.com:vandadnp/swift-weekly.git
15 |
16 | IDESourceControlProjectPath
17 | issue09/exampleCode/swift-weekly.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
21 | ../../../..
22 |
23 | IDESourceControlProjectURL
24 | github.com:vandadnp/swift-weekly.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
36 | IDESourceControlWCCName
37 | swift-weekly
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/issue09/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue09/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/issue09/exampleCode/swift-weekly.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | swift-weekly.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9DB1E3491A48323C006CE680
16 |
17 | primary
18 |
19 |
20 | 9DB1E35E1A48323C006CE680
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/issue09/exampleCode/swift-weekly/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/issue09/exampleCode/swift-weekly/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" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/issue09/exampleCode/swift-weekly/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | Pixolity-Ltd..$(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 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/issue09/exampleCode/swift-weekly/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // swift-weekly
4 | //
5 | // Created by vandadnp on 11/01/15.
6 | // Copyright (c) 2014 com.pixolity.ios. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | let array = ["Vandad",0xabcdefa, "Julian",0xabcdefb, "Leif", 0xabcdefc]
14 | as [AnyObject] //done to ensure no implicit NSArray conversion is happening
15 |
16 | func randomIndexInArray(a: [AnyObject]) -> Int{
17 | return Int(arc4random_uniform(UInt32(a.count)))
18 | }
19 |
20 | let dict = [
21 | 0xabcdefa : 0xabcdefa,
22 | 0xabcdefb : 0xabcdefb,
23 | 0xabcdefc : 0xabcdefc
24 | ]
25 |
26 | func randomIndexInDictionary(a: [Int : Int]) -> Int{
27 | return Int(arc4random_uniform(UInt32(a.count)))
28 | }
29 |
30 | func example1(){
31 |
32 | for i in 0..
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | Pixolity-Ltd..$(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 |
--------------------------------------------------------------------------------
/issue09/exampleCode/swift-weeklyTests/swift_weeklyTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // swift_weeklyTests.swift
3 | // swift-weeklyTests
4 | //
5 | // Created by vandadnp on 12/22/14.
6 | // Copyright (c) 2014 com.pixolity.ios. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class swift_weeklyTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/issue10/exampleCode/buildRelease.sh:
--------------------------------------------------------------------------------
1 | rm -rf build
2 | xcrun xcodebuild -sdk iphonesimulator -configuration Release -arch x86_64
3 | rm -rf ~/Desktop/output/
4 | mkdir ~/Desktop/output
5 | cp -r build/Release-iphonesimulator/swift-weekly.app ~/Desktop/output/
6 | cp -r build/Release-iphonesimulator/swift-weekly.app.dSYM ~/Desktop/output/
7 | open ~/Desktop/output/
8 |
9 |
--------------------------------------------------------------------------------
/issue10/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/issue10/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcshareddata/swift-weekly.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 1C9A8DF1-8785-449A-8532-6A6A13991328
9 | IDESourceControlProjectName
10 | swift-weekly
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
14 | github.com:vandadnp/swift-weekly.git
15 |
16 | IDESourceControlProjectPath
17 | issue10/exampleCode/swift-weekly.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
21 | ../../../..
22 |
23 | IDESourceControlProjectURL
24 | github.com:vandadnp/swift-weekly.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
36 | IDESourceControlWCCName
37 | swift-weekly
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/issue10/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue10/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/issue10/exampleCode/swift-weekly.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/issue10/exampleCode/swift-weekly.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | swift-weekly.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9DB1E3491A48323C006CE680
16 |
17 | primary
18 |
19 |
20 | 9DB1E35E1A48323C006CE680
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/issue10/exampleCode/swift-weekly/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/issue10/exampleCode/swift-weekly/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" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/issue10/exampleCode/swift-weekly/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | Pixolity-Ltd..$(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 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/issue10/exampleCode/swift-weekly/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // swift-weekly
4 | //
5 | // Created by vandadnp on 18/02/15.
6 | // Copyright (c) 2015 com.pixolity.ios. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | func example1(){
14 |
15 | let p = CGPoint(x: 0xaaaaaaaa, y: 0xbbbbbbbb)
16 | let f = view.frame
17 | let fs = f.size
18 |
19 | switch (p.x, p.y){
20 | case (0xabcdefc, 0):
21 | println(0xabcdefc)
22 | case (fs.width, 0xabcdefe):
23 | println(0xabcdefe)
24 | case (0xabcdeff, fs.height):
25 | println(0xabcdeff)
26 | default:
27 | println(0xffffffff)
28 | }
29 |
30 | }
31 |
32 | func randomInt() -> Int{
33 | return Int(arc4random_uniform(UInt32.max))
34 | }
35 |
36 | func example2(){
37 |
38 | switch randomInt(){
39 | case 0...100:
40 | println(0xabcdefa)
41 | case 101...200:
42 | println(0xabcdefb)
43 | default:
44 | println(0xabcdefc)
45 | }
46 |
47 | }
48 | override func viewDidLoad() {
49 | super.viewDidLoad()
50 | example2()
51 | }
52 |
53 | }
54 |
55 |
--------------------------------------------------------------------------------
/issue10/exampleCode/swift-weeklyTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | Pixolity-Ltd..$(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 |
--------------------------------------------------------------------------------
/issue10/exampleCode/swift-weeklyTests/swift_weeklyTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // swift_weeklyTests.swift
3 | // swift-weeklyTests
4 | //
5 | // Created by vandadnp on 12/22/14.
6 | // Copyright (c) 2014 com.pixolity.ios. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class swift_weeklyTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/issue11/exampleCode/buildRelease.sh:
--------------------------------------------------------------------------------
1 | rm -rf build
2 | xcrun xcodebuild -sdk iphonesimulator -configuration Release -arch x86_64
3 | rm -rf ~/Desktop/output/
4 | mkdir ~/Desktop/output
5 | cp -r build/Release-iphonesimulator/swift-weekly.app ~/Desktop/output/
6 | cp -r build/Release-iphonesimulator/swift-weekly.app.dSYM ~/Desktop/output/
7 | open ~/Desktop/output/
8 |
9 |
--------------------------------------------------------------------------------
/issue11/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/issue11/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcshareddata/swift-weekly.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 1C9A8DF1-8785-449A-8532-6A6A13991328
9 | IDESourceControlProjectName
10 | swift-weekly
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
14 | github.com:vandadnp/swift-weekly.git
15 |
16 | IDESourceControlProjectPath
17 | issue11/exampleCode/swift-weekly.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
21 | ../../../..
22 |
23 | IDESourceControlProjectURL
24 | github.com:vandadnp/swift-weekly.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
36 | IDESourceControlWCCName
37 | swift-weekly
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/issue11/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue11/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/issue11/exampleCode/swift-weekly.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/issue11/exampleCode/swift-weekly.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | swift-weekly.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9DB1E3491A48323C006CE680
16 |
17 | primary
18 |
19 |
20 | 9DB1E35E1A48323C006CE680
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/issue11/exampleCode/swift-weekly/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/issue11/exampleCode/swift-weekly/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" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/issue11/exampleCode/swift-weekly/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | Pixolity-Ltd..$(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 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/issue11/exampleCode/swift-weekly/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // swift-weekly
4 | //
5 | // Created by vandadnp on 18/02/15.
6 | // Copyright (c) 2015 com.pixolity.ios. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | func show(#msg: String, @autoclosure ifTrue: () -> Bool){
14 |
15 | if ifTrue(){
16 | println(msg)
17 | }
18 | }
19 |
20 | func example1(){
21 | let age = 200
22 | show(msg: "You are too old", ifTrue: age > 140)
23 | }
24 |
25 | @inline(never) func randomInt() -> Int{
26 | return Int(arc4random_uniform(UInt32.max))
27 | }
28 |
29 | func example2(){
30 | println(randomInt())
31 | }
32 |
33 | func findSingleCharacterNamesInArray(a: [String], @noescape callback: () -> ()){
34 | for s in a.filter({count($0.utf16) == 1}){
35 | callback()
36 | }
37 | }
38 |
39 | let msg = "Found a single character string"
40 |
41 | func example3(){
42 |
43 | let names = ["Vandad", "x", "Sara", "Leif", "Y", "Ulla"]
44 |
45 | findSingleCharacterNamesInArray(names){
46 | println(msg)
47 | }
48 |
49 | }
50 |
51 | @noreturn @inline(never) func example4(){
52 | fatalError("I am a terrible method")
53 | }
54 |
55 | override func viewDidLoad() {
56 | super.viewDidLoad()
57 | example4()
58 | if view.alpha == 0xabcdefa{ //this line gets a warning saying "Will never be executed"
59 | }
60 | }
61 |
62 | }
63 |
64 |
--------------------------------------------------------------------------------
/issue11/exampleCode/swift-weeklyTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | Pixolity-Ltd..$(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 |
--------------------------------------------------------------------------------
/issue11/exampleCode/swift-weeklyTests/swift_weeklyTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // swift_weeklyTests.swift
3 | // swift-weeklyTests
4 | //
5 | // Created by vandadnp on 12/22/14.
6 | // Copyright (c) 2014 com.pixolity.ios. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class swift_weeklyTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/issue12/exampleCode/buildRelease.sh:
--------------------------------------------------------------------------------
1 | rm -rf build
2 | xcrun xcodebuild -sdk iphonesimulator -configuration Release -arch x86_64
3 | rm -rf ~/Desktop/output/
4 | mkdir ~/Desktop/output
5 | cp -r build/Release-iphonesimulator/swift-weekly.app ~/Desktop/output/
6 | cp -r build/Release-iphonesimulator/swift-weekly.app.dSYM ~/Desktop/output/
7 | open ~/Desktop/output/
8 |
9 |
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcshareddata/swift-weekly.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 1C9A8DF1-8785-449A-8532-6A6A13991328
9 | IDESourceControlProjectName
10 | swift-weekly
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
14 | github.com:vandadnp/swift-weekly.git
15 |
16 | IDESourceControlProjectPath
17 | issue12/exampleCode/swift-weekly.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
21 | ../../../..
22 |
23 | IDESourceControlProjectURL
24 | github.com:vandadnp/swift-weekly.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | E94A170A65EDFE8DA707E7E6CDF20E24A328FC93
36 | IDESourceControlWCCName
37 | swift-weekly
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue12/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weekly.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weekly.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | swift-weekly.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9DB1E3491A48323C006CE680
16 |
17 | primary
18 |
19 |
20 | 9DB1E35E1A48323C006CE680
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weekly/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // swift-weekly
4 | //
5 | // Created by vandadnp on 18/02/15.
6 | // Copyright (c) 2015 com.pixolity.ios. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
17 | // Override point for customization after application launch.
18 | return true
19 | }
20 |
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weekly/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weekly/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" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weekly/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | se.pixolity.swift-weekly
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 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weekly/ObjcClass.h:
--------------------------------------------------------------------------------
1 | //
2 | // ObjcClass.h
3 | // swift-weekly
4 | //
5 | // Created by Vandad on 3/26/15.
6 | // Copyright (c) 2015 com.pixolity.ios. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ObjcClass : NSObject
12 |
13 | - (NSInteger) add:(NSInteger)a b:(NSInteger)b;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weekly/ObjcClass.m:
--------------------------------------------------------------------------------
1 | //
2 | // ObjcClass.m
3 | // swift-weekly
4 | //
5 | // Created by Vandad on 3/26/15.
6 | // Copyright (c) 2015 com.pixolity.ios. All rights reserved.
7 | //
8 |
9 | #import "ObjcClass.h"
10 |
11 | extern NSInteger addMethod(NSInteger a, NSInteger b);
12 |
13 | @implementation ObjcClass
14 |
15 | //NSInteger addMethod(NSInteger a, NSInteger b){
16 | // return a + b;
17 | //}
18 |
19 | - (NSInteger) add:(NSInteger)a b:(NSInteger)b{
20 | return addMethod(a, b);
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weekly/ObjcClass.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue12/exampleCode/swift-weekly/ObjcClass.o
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weekly/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // swift-weekly
4 | //
5 | // Created by vandadnp on 18/02/15.
6 | // Copyright (c) 2015 com.pixolity.ios. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 |
16 | let objc = ObjcClass()
17 | println("Result of add is \(objc.add(200, b: 300))")
18 |
19 | }
20 |
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weekly/arm.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue12/exampleCode/swift-weekly/arm.o
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weekly/arm.s:
--------------------------------------------------------------------------------
1 | .align 4
2 | .global _addMethod
3 | _addMethod:
4 | sub sp, sp, #16
5 | stp x1, x0, [sp]
6 | ldp x1, x0, [sp]
7 | add x0, x0, x1
8 | add sp, sp, #16
9 | ret
10 |
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weekly/both.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue12/exampleCode/swift-weekly/both.o
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weekly/intel.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue12/exampleCode/swift-weekly/intel.o
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weekly/intel.s:
--------------------------------------------------------------------------------
1 | .globl _addMethod
2 | _addMethod:
3 | pushq %rbp
4 | movq %rsp, %rbp
5 | movq %rdi, -0x8(%rbp)
6 | movq %rsi, -0x10(%rbp)
7 | movq -0x8(%rbp), %rsi
8 | addq -0x10(%rbp), %rsi
9 | movq %rsi, %rax
10 | popq %rbp
11 | retq
12 |
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weekly/swift-weekly-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 "ObjcClass.h"
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weeklyTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | Pixolity-Ltd..$(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 |
--------------------------------------------------------------------------------
/issue12/exampleCode/swift-weeklyTests/swift_weeklyTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // swift_weeklyTests.swift
3 | // swift-weeklyTests
4 | //
5 | // Created by vandadnp on 12/22/14.
6 | // Copyright (c) 2014 com.pixolity.ios. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class swift_weeklyTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/issue13/exampleCode/buildRelease.sh:
--------------------------------------------------------------------------------
1 | rm -rf build
2 | xcrun xcodebuild -sdk iphoneos -configuration Release
3 | rm -rf ~/Desktop/output/
4 | mkdir ~/Desktop/output
5 | cp -r build/Release-iphoneos/swift-weekly.app ~/Desktop/output/
6 | cp -r build/Release-iphoneos/swift-weekly.app.dSYM ~/Desktop/output/
7 | open ~/Desktop/output/
8 |
9 |
--------------------------------------------------------------------------------
/issue13/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/issue13/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/swift-weekly/d60fe3c0073dcefcd551c5530fa6a066eb05dc50/issue13/exampleCode/swift-weekly.xcodeproj/project.xcworkspace/xcuserdata/vandadnp.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/issue13/exampleCode/swift-weekly.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/issue13/exampleCode/swift-weekly.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | swift-weekly.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/issue13/exampleCode/swift-weekly/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/issue13/exampleCode/swift-weekly/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/issue13/exampleCode/swift-weekly/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // swift-weekly
4 | //
5 | // Created by Vandad NP on 1/19/18.
6 | // Copyright © 2018 Pixolity Ltd. 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 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/issue13/exampleCode/swift-weeklyTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/issue13/exampleCode/swift-weeklyTests/swift_weeklyTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // swift_weeklyTests.swift
3 | // swift-weeklyTests
4 | //
5 | // Created by Vandad NP on 1/19/18.
6 | // Copyright © 2018 Pixolity Ltd. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | @testable import swift_weekly
11 |
12 | class swift_weeklyTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | // Use XCTAssert and related functions to verify your tests produce the correct results.
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measure {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------