Skip to content

Instantly share code, notes, and snippets.

@martinbowling
martinbowling / AppDelegate.cs
Created April 11, 2012 17:41 — forked from conceptdev/AppDelegate.cs
CoreImage quick'n'dirty sample: Contrast/Saturation/Brightness editing (screenshot http://twitpic.com/93gfty)
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
namespace ColorControl {
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
public void sendTweet(string updateText)
{
ACAccountStore account = new ACAccountStore();
var accountType = account.FindAccountType(ACAccountType.Twitter);
account.RequestAccess(accountType,(granted,NSError)=> {
if(!granted)
return;
var arrayOfAccounts = account.FindAccounts(accountType);
if(arrayOfAccounts != null && arrayOfAccounts.Length == 0)
@martinbowling
martinbowling / gist:1987596
Created March 6, 2012 17:23 — forked from eric/gist:701636
ReaderJSController.originalArticleFinder()
/* ReaderJSController.originalArticleFinder(): */
{
"contentDocument": [object HTMLDocument],
"didSearchForArticleNode": true,
"article": [object Object],
"didSearchForPrependedArticleNode": true,
"prependedArticle": null,
"_cachedScrollY": 0,
"_cachedScrollX": 0,
"_elementsWithCachedBoundingRects": [object HTMLDivElement],
using System;
using MonoTouch.UIKit;
using System.Drawing;
using MonoTouch.AudioToolbox;
namespace GoogleMusic
{
public class LevelMeter : UIView
{
public AudioQueueLevelMeterState[] AudioLevelState {get;set;}
@martinbowling
martinbowling / gist:1952000
Created March 1, 2012 18:34 — forked from Clancey/gist:1437549
Android State Manager
using System;
using System.Collections.Generic;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
public class StateManager
{
public StateManager ()
{
}
@martinbowling
martinbowling / .gitignore
Created December 14, 2011 20:20 — forked from rpetrich/.gitignore
Replace codesigning in iOS apps and generate IPA files. By design, does not work with encrypted apps
embedded.mobileprovision
@martinbowling
martinbowling / NotificationBar
Created November 29, 2011 00:06 — forked from Clancey/NotificationBar
NotificationBar
using System;
using ClanceysLib;
using MonoTouch.UIKit;
using MonoTouch.Foundation;
using System.Threading;
using MonoTouch.ObjCRuntime;
using System.Drawing;
using MonoTouch.CoreGraphics;
using System.Linq;
namespace Collaborate
@martinbowling
martinbowling / scale.cs
Created November 11, 2011 17:40 — forked from nicwise/scale.cs
Scale and Rotate an image in iOS / MonoTouch, using the EXIF data
public static UIImage ScaleImage(UIImage image, int maxSize)
{
UIImage res;
using (CGImage imageRef = image.CGImage)
{
CGImageAlphaInfo alphaInfo = imageRef.AlphaInfo;
CGColorSpace colorSpaceInfo = CGColorSpace.CreateDeviceRGB();
if (alphaInfo == CGImageAlphaInfo.None)
using System;
using ClanceysLib;
using MonoTouch.UIKit;
using MonoTouch.Foundation;
using System.Threading;
using MonoTouch.ObjCRuntime;
using System.Drawing;
using MonoTouch.CoreGraphics;
using System.Linq;
namespace Collaborate
@martinbowling
martinbowling / gist:1233161
Created September 21, 2011 20:17 — forked from Clancey/gist:1047006
MapView With MKPolyLines For route
using System;
using MonoTouch.UIKit;
using System.Collections.Generic;
using MonoTouch.MapKit;
using System.Threading;
using ClanceysLib;
using MonoTouch.Foundation;
using System.Linq;
using MonoTouch.CoreLocation;
using System.Drawing;