Skip to content

Instantly share code, notes, and snippets.

Frank Courville Frankacy

View GitHub Profile
@Frankacy
Frankacy / RequestTemplate.swift
Created Sep 11, 2019
An alternative way to specify RequestTemplate
View RequestTemplate.swift
// So this is the same...
public enum HTTPMethod: String {
case get = "GET"
case post = "POST"
case put = "PUT"
case delete = "DELETE"
case patch = "PATCH"
}
@Frankacy
Frankacy / b.article
Created Jul 23, 2019
Bear Zettel Typinator Template
View b.article
# {YYYY}{MM}{DD}{h024}{m} - {{?Title}}
Source:
Tags: #&&
---
---
# Related Articles
@Frankacy
Frankacy / DataProviding.swift
Last active May 22, 2020
Swift data provider/presenter
View DataProviding.swift
//
// DataProviding.swift
// GenericsDataSource
//
// Created by Frank Courville on 2019-05-09.
// Copyright © 2019 iOS Coach Frank. All rights reserved.
//
import UIKit
View OperationsPart1.playground
import UIKit
import PlaygroundSupport
PlaygroundPage.current.needsIndefiniteExecution = true
class LoggingOperation : Operation {
override func main() {
if isCancelled {
return;
}
View FRKTableViewAdapter.h
@interface TableViewAdapter : NSObject <FRKDataProvider, UITableViewDataSource>
- (instancetype)initWithDataProvider:(id<FRKDataProvider, FRKSectionInfoProvider>)provider
dataPresenter:(id<FRKTableViewDataPresenter>)presenter;
- (void)registerCellsForTableView:(UITableView *)tableView;
@end
@Frankacy
Frankacy / FRKCoreDataProvider.h
Created Nov 15, 2016
Data Providers and Presenters
View FRKCoreDataProvider.h
#import <CoreData/CoreData.h>
#import "FRKDataProvider.h"
@interface FRKCoreDataProvider : NSObject <FRKDataProvider, FRKSectionInfoProvider>
- (instancetype)initWithFetchRequest:(NSFetchRequest *)fetchRequest moc:(NSManagedObjectContext *)fetchMOC;
- (instancetype)initWithFetchRequest:(NSFetchRequest *)fetchRequest moc:(NSManagedObjectContext *)fetchMOC sectionKeypath:(NSString *)section;
@end
You can’t perform that action at this time.