Skip to content

Instantly share code, notes, and snippets.

View nicwise's full-sized avatar
🙀
Screaming At Clouds

Nic Wise nicwise

🙀
Screaming At Clouds
View GitHub Profile
@nicwise
nicwise / crash compiler
Created July 26, 2013 16:55
Crashes the Mono 3.2.0 compiler
public class MainThing
{
public static void Main(string[] args)
{
var foo = new Foo();
foo.Die();
}
}
public class Foo
@laumania
I'm having a bit of trouble following the thread (might be to do with it being 36deg outside and I've just done a Bikram Yoga class in a 41deg + humid room, so my body is a bit in shock!)
In general, you can't (or shouldn't) have a UITabBarController inside... well, anything. It needs to be the top, so:
UITabBarController
+ UINavigationController
@nicwise
nicwise / gist:5772980
Last active December 18, 2015 11:08
Getting the UDID even tho Xamarin removed it
var foo = UIDevice.CurrentDevice.UniqueIdentifier;
var bar = UDID ();
Console.WriteLine (foo + "////" + bar);
return true;
}
public string UDID()
@nicwise
nicwise / NoLabelEntryElement.cs
Last active December 16, 2015 13:08
Label-less EntryElement
using System;
using MonoTouch.Dialog;
using MonoTouch.Foundation;
namespace mixandmatch
{
public class NoLabelEntryElement : EntryElement
{
public NoLabelEntryElement (string placeholder, string val = "") : base(null, placeholder, val)
{
@nicwise
nicwise / RCSwitch.cs
Created April 22, 2013 19:31
Port of RCSwitch
//
// Copyright 2012 James Clancey, Xamarin Inc (http://www.xamarin.com)
//
// based on code by Robert Chin
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
@nicwise
nicwise / gist:5325253
Created April 6, 2013 07:18
Budget SplitView
public class BaseSplitViewController : UIViewController
{
public float LeftWidth = 250;
public UIViewController LeftController;
public UIViewController RightController;
public BaseSplitViewController() : base()
{
Apr 3 11:52:54 Crania kernel[0] <Debug>: set_crc_notification_state 0
Apr 3 11:52:54 Crania kernel[0] <Debug>: ALS: AppleARMBacklight::handleMessageGated - framebufferState -> 1
Apr 3 11:52:54 Crania kernel[0] <Debug>: ALS: AppleARMBacklight::setBacklightEnableGated 1 (set level to 0x52b)
Apr 3 11:53:05 Crania Language_Learner[11555] <Warning>:
Unhandled Exception:
0 Language_Learner 0x0046c421 Language_Learner + 4633633
1 Language_Learner 0x0046d2fd Language_Learner + 4637437
2 Language_Learner 0x0046d8d3 Language_Learner + 4638931
3 Language_Learner 0x00456a05 Language_Learner + 4545029
4 Language_Learner 0x002c0fac Language_Learner + 2883500
public class MultilineEditElement : StringElement
{
static NSString skey = new NSString("multilineeditelement");
public MultilineEditElement(string caption, string val) : base(caption, val)
{
}
class MyViewController : UIViewController {
MultilineEditElement container;
using System;
using MonoTouch.Dialog;
using System.Linq.Expressions;
using MicroAgent.Library.Models;
using MonoTouch.UIKit;
using MicroAgent.Library.Database;
using MicroAgent.Common;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Linq;
using System;
using MonoTouch.Dialog;
using MicroAgent.Library.Database;
using MicroAgent.Common;
using MonoTouch.UIKit;
using MonoTouch.CoreFoundation;
using MonoTouch.Foundation;
using MicroAgent.Library.Models;
using System.Threading.Tasks;
using MonoTouch.MediaPlayer;