This is Github user search demo app that made with Flux design pattern.
Search Github user and show user result list
- SearchViewDataSource <- Adapt UITableViewDataSource and UITableViewDelegate
Show local on memory favorite repositories
- FavoriteViewDataSource <- Adapt UITableViewDataSource and UITableViewDelegate
Show Github user's repositories
- UserRepositoryViewDataSource <- Adapt UITableViewDataSource and UITableViewDelegate
Show a repository and add / remove local on memory favorites
You can add / remove favorite repositories in RepositoryViewController. Array of favorite repository is hold by RepositoryStore, therefore you can use its reference everywhere!
To run this example, you need make install
.
In addition, you need to set Github Personal Access Token
like this.
extension ApiSession {
static let shared: ApiSession = {
let token = "" // <- Your Github Personal Access Token
return ApiSession(injectToken: { InjectableToken(token: token) })
}()
}
- Xcode 10.1 or later
- iOS 11 or later
- Swift 4.2 or later
marty-suzuki, [email protected]
iOSDesignPatternSamples is available under the MIT license. See the LICENSE file for more info.