Skip to content

Instantly share code, notes, and snippets.

//does the actual coloring
void DrawPoints (CGContext dctx)
{
dctx.BeginPath ();
dctx.MoveTo (Points.First().X, Points.First().Y);
dctx.SetLineWidth(swatchSlider.Value);
dctx.SetBlendMode (CGBlendMode.Normal);
foreach (var crayon in Crayons) {
public NSArray ToNSArray (int[] array)
{
NSArray nsArray = null;
var objects = Array.ConvertAll (array, i => (object)i);
if (objects != null) {
nsArray = NSArray.FromObjects (objects);
}
return nsArray;
@mikebluestein
mikebluestein / gist:2079186
Created March 18, 2012 18:18
Add a TXTRecord using Bonjour and MonoTouch
NetDelegate _netDel;
NSNetService _ns;
void InitNetService ()
{
_ns = new NSNetService ("", "_testservice._tcp", UIDevice.CurrentDevice.Name, 9999);
_netDel = new NetDelegate ();
_ns.Delegate = _netDel;
// add TXTRecordData
@mikebluestein
mikebluestein / Scene Kit Collada.md
Created June 12, 2015 18:30
simple example showing how to load a Collada file in Scene Kit using Xamarin.iOS
SCNScene scene;
SCNView sceneView;
SCNCamera camera;
SCNNode cameraNode;

public override void ViewDidLoad ()
{
	scene = SCNScene.FromFile ("duck", "ColladaModels.scnassets", new SCNSceneLoadingOptions ());
@mikebluestein
mikebluestein / gist:985273c7db8b33698668
Created April 9, 2015 16:24
The Apple Review Song
I'm waiting and I'm waiting for my Apple review.
I'm going to get rejected and so are you.
I'm waiting and I'm waiting for my Apple review.
I have no watch. There's not much I can do.
I'm waiting and I'm waiting for my Apple review.
I may as well have built an app for a kazoo.
rollin in C.T. ...VW in gear 3
pickin up the milk, the produce, and some tea
dropin crazy rhymes, while I'm running out of time
got my wife some flowers, forgot the movie, but got Amazon Prime
hey ho
but got Amazon Prime
hey ho
but got Amazon Prime
namespace FSHelloSceneKit
open System
open MonoTouch.UIKit
open MonoTouch.Foundation
open MonoTouch.SceneKit
type FSHelloSceneKitViewController () =
inherit UIViewController()