An iOS exercise on TableViewController, UserDefault, CoreData, MVC, Segue, etc. with Swift 4 and Xcode 9.
- UITableViewConroller
- UIAlertController for data entry
- UserDefault to persist data
- Navigation Controller
- MVC design pattern
- Data Model
- Codable protocol and plist
- UISearchBar
- Keyboard dismissal using async with resignFirstResponder
- CoreData query
- Realm Database https://realm.io/products/realm-database
- Realm Database is an alternative to SQLite and Core Data
- Reference: https://realm.io/docs/swift/latest#installation
- If Cocoapods not yet installed, run
$ gem install cocoapods
- Run
$ pod repo update
before proceeding, in case there are updates. - Open a Terminal session and change directory to your project folder
- Run
$ pod init
to initial your project with CocoaPods - Run
$ open Podfile -a Xcode
(to open and edit Podfile in Xcode) - In Xcode, remove the first line and
#
on the second line to target iOS 9.0 and above. - Add
pod 'RealmSwift'
before theend
keyword inPodfile
(see Content of Podfile after edit below) - Save the file and then go back to the Terminal session.
- Run
$ pod install
to install Realm pods into the project. - From this point on, open the project with the
.xcworkspace
file.
- SwipeCellKit is a Swipeable UITableViewCell based on the stock Mail.app, implemented in Swift.
- References:
- Assuming steps 1 to 6 above for Realm were completed
- Run
$ open Podfile -a Xcode
(to open and edit Podfile in Xcode) - Add
pod 'SwipeCellKit'
before theend
keyword inPodfile
(see Content of Podfile after edit below) - Run
$ pod install
to install Realm pods into the project. - Open the project with the
.xcworkspace
file.
Content of Podfile after edit:
platform :ios, '9.0'
target 'ToDoList' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for ToDoList
pod 'RealmSwift'
pod 'SwipeCellKit'
end
Chameleon is a lightweight, yet powerful, color framework for iOS (Objective-C & Swift). It is built on the idea that software applications should function effortlessly while simultaneously maintaining their beautiful interfaces. https://github.com/ViccAlexander/Chameleon