Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
Swift3対応版を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
marty-suzuki committed Dec 4, 2016
1 parent 727346b commit 7cde6d9
Show file tree
Hide file tree
Showing 752 changed files with 44,027 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -7,3 +7,7 @@ project.xcworkspace
*.xcworkspace/xcuserdata/*
xcuserdata
*/Pods/*
*/Carthage/Checkouts/*i
*/Carthage/Checkouts
*/Carthage/Build/*
*/Carthage/Build
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -3,6 +3,8 @@ iOS Development Training Course Repository

iOS アプリ開発の基礎知識と実務スキルを身に付けるトレーニングコース

Swiftバージョンは[こちら](./Swift/README.md)

前提
------

Expand Down
201 changes: 201 additions & 0 deletions Swift/README.md
@@ -0,0 +1,201 @@
# iOS Development Training Course in Swift3

SwiftでのiOSアプリ開発の基礎知識と実務スキルを身に付けるトレーニングコース

### 概要

* [iOSTraining](https://github.com/mixi-inc/iOSTraining)を基にして必要そうな部分を抜き出し短期間で要点だけを身につけるものにしています。
* 当コースはエンジニア向けに構成されています。
* 課題によって、実装前と実装後(それぞれbefore, after)のプロジェクトを用意しています。

### 環境

* Xcode8.1以降
* Swift3

## 1日目

#### 項目

1. 導入

1. 基礎知識
課題 [1.1 Swiftの基礎](./pages/day1/1-1_swift-basics.md)
プロジェクト [day1/1.1](./before/day1/1.1)

2. プロパティの属性、メモリ
課題 [1.2 メモリ管理](./pages/day1/1-2_memory-management.md)
プロジェクト [day1/1.2](./before/day1/1.2)

3. ビューコントローラ
課題 [1.3.1 UIViewControllerのカスタマイズ(stroyboard)](./pages/day1/1-3-1_UIViewController-customization-storyboard.md)
補足 [1.3.2 UIViewControllerのカスタマイズ(xib)](./pages/day1/1-3-2_UIViewController-customization-xib.md)
プロジェクト [day1/1.3](./before/day1/1.3)

4. モーダル
課題 [1.4.1 UIViewControllerのModalViewController(storyboard)](./pages/day1/1-4-1_ModalViewController-storyboard.md)
補足 [1.4.2 UIViewControllerのModalViewController(xib)](./pages/day1/1-4-2_ModalViewController-xib.md)
プロジェクト [day1/1.4](./before/day1/1.4)

5. ライフサイクル
課題 [1.5 UIViewControllerのライフサイクル](./pages/day1/1-5_UIViewController-lifecycle.md)

#### 宿題

- 課題 [HomeWork 1.2 UIViewControllerとModalViewController](https://github.com/mixi-inc/iOSTraining/wiki/HomeWork-1.2-UIViewController%E3%81%A8ModalViewController)
プロジェクト [day1/homework](./before/day1/homework)

## 2日目

#### 項目

1. UIKit 1 - container, rotate-

1. ナビゲーション
課題 [1.1 UINavigationController](./pages/day2/1-1_UINavigationController.md)
プロジェクト [day2/1.1](./before/day2/1.1)

2. タブ
課題 [1.2 UITabController](./pages/day2/1-2_UITabController.md)
プロジェクト [day2/1.2](./before/day2/1.2)

3. 回転
課題 [1.3 Supporting Multiple Interface Orientations](./pages/day2/1-3_Supporting-Multiple-Interface-Orientations.md)

2. UIKit 2- UIView -

1. ビュー1
課題 [2.1 UIView](./pages/day2/2-1_UIView.md)
プロジェクト [day2/2.1](./before/day2/2.1)

2. ビュー2
課題 [2.2 UIViewのカスタマイズ](./pages/day2/2-2_UIView-customization.md)

3. アニメーション
課題 [2.3 UIView Animation](./pages/day2/2-3_UIView-Animation.md)
プロジェクト [day2/2.3](./before/day2/2.3)

4. Auto Layout
課題 [2.4 AutoLayout](./pages/day2/2-4_AutoLayout.md)

3. UIKit 3 - table view -

1. テーブル1
課題 [3.1 UITableViewについて](./pages/day2/3-1_UITableView.md)
プロジェクト [day2/3.1](./before/day2/3.1)

2. テーブル2
課題 [3.2 UITableViewとNavigationController](.//pages/day2/3-2_UITableView-and-UINavigationController.md)
参考 [1.1 UINavigationController](./pages/day2/1-1_UINavigationController.md)
プロジェクト [day2/3.2](./before/day2/3.2)

3. セル
課題 [3.3 カスタムUITableViewCellの作成](./pages/day2/3-3_UITableViewCell-customization.md)

4. テーブルのカスタマイズ
課題 [3.4 UITableViewのその他のオプション、カスタマイズ](./pages/day2/3-4_UITableView-other-options.md)
参考 [3.1 UITableViewについて](./pages/day2/3-1_UITableView.md)
プロジェクト [day2/3.4](./before/day2/3.4)

5. セルの高さ
課題 [3.5 Dynamic height with a custom UITableViewcell](./pages/day2/3-5_Dynamic-height-with-a-custom-UITableViewCell.md)

#### 宿題

* 課題 [HomeWork 3.1 UIScrollView](./pages/day2/HomeWork-UIScrollView.md)
プロジェクト [day2/homework](./before/day2/homework)

## 3日目

#### 項目

1. Closure, GCD

1. Closure
課題 [1.1 Closure](./pages/day3/1-1_Closure.md)
プロジェクト [day3/1.1](./before/day3/1.1)

2. GCD
課題 [1.2 Grand Central Dispatch](./pages/day3/1-2_Grand-Central-Dispatch.md)

2. UIKit 4 - image and text -

1. 画像1
課題 [2.1 UIImagePickerController](./pages/day3/2-1_UIImagePickerController.md)
プロジェクト [day3/2.1](./before/day3/2.1)

2. 画像2
課題 [2.2 PhotoKit](./pages/day3/2-2_PhotoKit.md)

3. テキスト
課題 [2.3.1 KeyboardNotification](./pages/day3/2-3-1_KeyboardNotification.md)
参考 [2.3.2 UITextFiled, UITextView](./pages/day3/2-3-2_UITextFiled-UITextView.md)
プロジェクト [day3/2.3](./before/day3/2.3)

3. ローカルキャッシュと通知

1. 設定
課題 [3.1 UserDefaults, Settings Bundle](./pages/day3/3-1_UserDefaults-Settings-Bundle.md)
プロジェクト [day3/3.1](./before/day3/3.1)

2. ファイル
課題 [3.2 FileManager](./pages/day3/3-2_FileManager.md)
プロジェクト [day3/3.2](./before/day3/3.2)

3. オブザーバ
課題 [3.3 Key Value Observing](./pages/day3/3-3_Key-Value-Observing.md)

4. 通知
課題 [3.4 Notification、NotificationCenter を用いた通知](./pages/day3/3-4_Notification-NotificationCenter.md)
参考 [2.3.1 KeyboardNotification](./pages/day3/2-3-1_KeyboardNotification.md)

4. ネットワーク処理

1. JSON
課題 [4.1 JSONのシリアライズとデシリアライズ](./pages/day3/4-1_JSON.md)

2. 通信
課題 [4.2 HTTPリクエストの基礎](./pages/day3/4-2_HTTP-request-basic.md)
参考 [App Transport Security](http://developer.hatenastaff.com/entry/2016/06/16/165924)
参考 [AlamofireとSwiftyJSONでAPIを叩くチュートリアル](http://qiita.com/yutat93/items/1b6dfe34fa8537cf3329)
プロジェクト [day3/4.2](./before/day3/4.2)

3. ウェブビュー
課題 [4.3 WKWebView](./pages/day3/4-3_WKWebView.md)
プロジェクト [day3/homework](./before/day3/homework)

#### 宿題

* 課題 [4.3 WKWebView](./pages/day3/4-3_WKWebView.md)
プロジェクト [day3/homework](./before/day3/homework)

## 4日目

1. 開発ツール

1. デバッグ
課題 [1.1 開発ツール](./pages/day4/1-1_development-tools.md)

2. CocoaPods
課題 [1.2 CocoaPods](./pages/day4/1-2_CocoaPods.md)
参考 [開発レシピ:Objective-Cのライブラリ管理ツール](http://www.iosjp.com/dev/archives/451)

3. Carthage
課題 [1.3 Carthage](./pages/day4/1-3_Carthage.md)
参考 [Swiftで使えるライブラリ管理ツールCarthageの使い方](http://kotalab.com/carthage-install)
参考 [Swift Package Manager を試してみました](http://dev.classmethod.jp/etc/swift-package-manager-1/)

2. 設計とデザインパターン

1. クラス設計1
課題 [2.1 クラス設計 1](./pages/day4/2-1_class-design-1.md)

2. クラス設計2
課題 [2.2 クラス設計 2](./pages/day4/2-2_class-design-2.md)

3. クラス設計3
課題 [2.3 プロトコル指向プログラミング](./pages/day4/2-3_protocol-oriented-programming.md)

4. クラス設計4
課題 [2.4 クラス設計演習](./pages/day4/2-4_class-design-3.md)
プロジェクト [day4/homework](./before/day4/homework)
50 changes: 50 additions & 0 deletions Swift/after/day1/1.1/HelloWorld.playground/Contents.swift
@@ -0,0 +1,50 @@
//: Playground - noun: a place where people can play

let h: String? = "H"
let ell = "ell"
let o: String? = "o"
var world: String! = nil
world = " world!"


//模範解答1
let helloWorld: String
/*
* var world: String!はImplicitlyUnwrappedOptionalなので
* optional bindingをしなくても、この場合は値が入っているので
* 値をそのまま使うことができるが、値が入っていない場合にクラッシュするので
* optional bindingを行っておく。
*/
if let h2 = h, let o2 = o, let world2 = world {
helloWorld = h2 + ell + o2 + world2
} else {
helloWorld = ""
}
print(helloWorld)


//模範解答2
/*
* [h, ell, o, world]は[String?]型なので
* flatMapで[String]型に変換し、[String]型の
* public func joined(separator: String = default) -> String
* を使って内部のstringを結合する。
* ※ループさせる回数が増える
*/
let helloWorld2: String = [h, ell, o, world].flatMap { $0 }.joined()
print(helloWorld2)


//模範解答3
/*
* reduceを使って[String?]の中身を結合していく。
* 結合するためには、Stringにしなければいけないので
* optional bindingされた文字列をresultに結合して返す。
*/
let helloWorld3: String = [h, ell, o, world].reduce("") { result, value in
guard let value = value else {
return ""
}
return result + value
}
print(helloWorld3)
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<playground version='5.0' target-platform='ios'>
<timeline fileName='timeline.xctimeline'/>
</playground>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions Swift/after/day1/1.1/JSON.playground/Contents.swift
@@ -0,0 +1,31 @@
//: Playground - noun: a place where people can play

let dict: [String : [[String : Any?]]] = [
"users" : [
[
"name" : "Dr. Emmett Brown",
"gender" : 1,
"era" : 1985,
"age" : 65,
"visits" : [
1885, 1955, 1985, 2015
]
],
[
"name" : "Marty McFly",
"gender" : 1,
"era" : 1985,
"age" : 17,
"visits" : [
1885, 1955, 1985, 2015
]
],
[
"name" : "Lorraine Baines",
"gender" : 1,
"era" : 1955,
"age" : 18,
"visits" : nil
]
]
]
4 changes: 4 additions & 0 deletions Swift/after/day1/1.1/JSON.playground/contents.xcplayground
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<playground version='5.0' target-platform='ios'>
<timeline fileName='timeline.xctimeline'/>
</playground>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7cde6d9

Please sign in to comment.