2017年3月22日 星期三

Ep8_How to Send Messages

建立 ChatLogController
MessageController 跳至 ChatLogController
將 UIView 加入 ChatLogController 底部
將 sendButton 加入 UIView
將 textField 加入 UIView
將 textField的資料 上傳至database

2017年3月21日 星期二

Ep7_Lets Fix some Bugs and Use JPEG Image Compression

Bug1 : 修復註冊後NavigationItem可以顯示註冊者名稱
Bug2 : 修復登入時,都是顯示上一次使用者的名稱
Bug3 : 圖片檔太大,以致於TableView載入圖片檔變慢
NavigationItem 加入 圖片

2017年3月19日 星期日

自訂TableViewCell


建立 TableViewController
建立 TableViewCell 類別,並將 ImageView 加入 TableViewCell
將 TableViewCell 加入 TableViewController
加入 textLabel & detailTextLabel
設定 textLabel & detailTextLabel 位置
將 ImageView 設為圓形

TableViewController



建立 TableViewController
關閉 main.storyboard
設定程式開啟時,讀取 ViewController
將 UIViewController 改為 UITableViewController
將 ViewController.swift 的名稱改為 MyTableViewController.swift
隱藏狀態列
UIViewController

2017年3月18日 星期六

內建TabelViewCell


建立 TableViewController
建立 內建TableViewCell
隱藏狀態列
UITableViewController
UITableViewDataSource
UITableViewCell
UITableViewCellStyle
UIViewController

UITableViewDataSource

numberOfSections
設定 TableView Section 的數量

numberOfRowsInSections
設定 TableView Row 的數量

cellForRowAtIndexPath
設定 TableView Cell 的內容

titleForHeaderInSection

titleForFooterInSection

canEditRowAtIndexPath

canMoveRowAtIndexPath

sectionIndexTitles

sectionForSectionIndexTtitle

commitEditStyle

moveRowAtSourceIndexPath