Skip to content

Instantly share code, notes, and snippets.

View Frankacy's full-sized avatar

Frank Courville Frankacy

View GitHub Profile
@Frankacy
Frankacy / RequestTemplate.swift
Created September 11, 2019 19:12
An alternative way to specify RequestTemplate
// 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 July 23, 2019 12:55
Bear Zettel Typinator Template
# {YYYY}{MM}{DD}{h024}{m} - {{?Title}}
Source:
Tags: #&&
---
---
# Related Articles
@Frankacy
Frankacy / DataProviding.swift
Last active October 15, 2021 10:48
Swift data provider/presenter
//
// DataProviding.swift
// GenericsDataSource
//
// Created by Frank Courville on 2019-05-09.
// Copyright © 2019 iOS Coach Frank. All rights reserved.
//
import UIKit
import UIKit
import PlaygroundSupport
PlaygroundPage.current.needsIndefiniteExecution = true
class LoggingOperation : Operation {
override func main() {
if isCancelled {
return;
}
@Frankacy
Frankacy / FRKTableViewAdapter.h
Created November 16, 2016 12:23
Table View Adapter
@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 November 15, 2016 04:43
Data Providers and Presenters
#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