Skip to content

Instantly share code, notes, and snippets.

View vtourraine's full-sized avatar

Vincent Tourraine vtourraine

View GitHub Profile
@vtourraine
vtourraine / NetworkManager.h
Created March 8, 2018 16:09
Test block as parameter with OCMock
//
// NetworkManager.h
//
@import Foundation;
@interface NetworkManager : NSObject
- (void)fetchDataCompletion:(void(^)(NSString *))completion;
- (void)GET:(NSString *)path completion:(void(^)(NSData *))completion;
@vtourraine
vtourraine / CloudsView.swift
Created August 23, 2018 08:37
View with clouds floating by.
//
// CloudsView.swift
//
// Swift 4.2
//
import UIKit
@available(iOS 10.0, *)
class CloudsView: UIView {
@vtourraine
vtourraine / clean_booted_sim_status_bar
Last active November 20, 2019 11:51
Clean the iOS Simulator status bar for the currently booted simulator
xcrun simctl status_bar `xcrun simctl list devices | grep "Booted" | sed -e 's/.* (\(.*\)) (Booted.*/\1/'` override --time "9:41" --batteryState charged --batteryLevel 100 --cellularBars 4
<html>
<head>
<style>
:root {
color-scheme: light dark;
}
body {
font-family: -apple-system;
font-size: 10pt;
// MARK: - Menus
override func buildMenu(with builder: UIMenuBuilder) {
super.buildMenu(with: builder)
builder.insertChild(AppDelegate.fileMenu(), atStartOfMenu: .file)
builder.insertChild(AppDelegate.viewMenu(), atStartOfMenu: .view)
builder.remove(menu: .format)
builder.remove(menu: .toolbar)
builder.remove(menu: .help)