Skip to content

Instantly share code, notes, and snippets.

View mimthath4's full-sized avatar

Imthath mimthath4

View GitHub Profile
import Foundation
private let bgQueue = DispatchQueue(label: "MIUsecase")
/// Provide implementation for the execute method and then
/// call perform to get response in main thread
/// call execute to get response in background thread
public protocol MIUsecase: class {
associatedtype MIUsecaseRequest
associatedtype MIUsecaseResponse
extension ViewController: UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
// your implementation goes here
}
func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
// your implementation goes here
}