Skip to content

Instantly share code, notes, and snippets.

@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
@vtourraine
vtourraine / ActivitiesViewController.swift
Created February 25, 2016 15:40
ResearchKit activities controller managing a survey.
//
// ActivitiesViewController.swift
// MyStudyApp
//
// Created by Vincent Tourraine on 2/8/16.
// Copyright © 2016 Shazino. All rights reserved.
//
import UIKit
import ResearchKit
// 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)
<html>
<head>
<style>
:root {
color-scheme: light dark;
}
body {
font-family: -apple-system;
font-size: 10pt;