Skip to content

Instantly share code, notes, and snippets.

@vtourraine
vtourraine / MedicationController.swift
Created February 23, 2016 11:00
AppCore / Medication
let vc = APCMedicationTrackerCalendarViewController(nibName: "APCMedicationTrackerCalendarViewController", bundle: NSBundle(identifier: "org.researchkit.APCAppCore"))
vc.step = ORKStep(identifier: "medstep")
let navController = UINavigationController(rootViewController: vc)
navController.navigationBar.translucent = false
// window().rootViewController?.presentViewController(navController, animated: true, completion: nil)
@vtourraine
vtourraine / DashboardViewController.swift
Created February 17, 2016 10:20
ResearchKit dashboard controller with activity completion pie chart
//
// DashboardViewController.swift
// MyStudyApp
//
// Created by Vincent Tourraine on 2/16/16.
// Copyright © 2016 Shazino. All rights reserved.
//
import UIKit
import ResearchKit
+ (void)customizeAppearance
{
UIColor *lightColor = [UIColor lightGrayColor];
UIColor *darkColor = [UIColor darkGrayColor];
// Navigation bar
UIGraphicsBeginImageContext(CGSizeMake(1, 1));
UIBezierPath *rectBezierPath = [UIBezierPath bezierPathWithRect:CGRectMake(0, 0, 1, 1)];
[lightColor setFill];
[rectBezierPath fill];
@vtourraine
vtourraine / merge-ochamcrest.sh
Created December 8, 2011 16:44
Copy OCHamcrest headers into a single folder in order to use it as a framework with the static library
mkdir -p OCHamcrest
cp -f ../OCHamcrest/Source/OCHamcrest.h OCHamcrest/;
find ../OCHamcrest/Source/Core/ -type f -name '*.h' -exec cp -f {} OCHamcrest/ \;
find ../OCHamcrest/Source/Library/ -type f -name '*.h' -exec cp -f {} OCHamcrest/ \;
/*
File: KeychainItemWrapper.h
Abstract:
Objective-C wrapper for accessing a single keychain item.
Version: 1.2
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
Inc. ("Apple") in consideration of your agreement to the following
terms, and your use, installation, modification or redistribution of