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 / gist:2039964
Created March 14, 2012 22:16
appearance manager
namespace MicroAgent.Library
{
public class AppearanceManager
{
public AppearanceManager ()
{
}
public static void SetAppearance()
{
@nicwise
nicwise / gist:2169082
Created March 23, 2012 09:45
Appirator
using System;
using System.Threading;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using MonoTouch.CoreFoundation;
namespace MobileAgent
{
public class Appirator
@nicwise
nicwise / gist:2226328
Created March 28, 2012 13:49
version check
public static bool IsIOS41OrBetter
{
get
{
string version = UIDevice.CurrentDevice.SystemVersion;
string[] versionElements = version.Split('.');
if (versionElements.Length > 0)
{
// the end of FinishedLaunching
window.RootViewController = tabBar;
window.MakeKeyAndVisible ();
AtmHudManager.Instance.RegisterView(window);
if (Settings.Current.FirstStartup)
{
oc = new OnboardingController();
@nicwise
nicwise / gist:2311681
Created April 5, 2012 14:53
iOS version checking
public static bool IsIOS41OrBetter
{
get
{
string version = UIDevice.CurrentDevice.SystemVersion;
string[] versionElements = version.Split('.');
if (versionElements.Length > 0)
{
@nicwise
nicwise / gist:2311745
Created April 5, 2012 14:57
checking for ios5
public static void SetAppearance()
{
if (Util.IsIOS5OrBetter)
{
//do some stuff here
}
}
public static string RootPath
{
get
{
return Path.Combine(Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments), "..");
}
}
public static string DocumentPath
{
public static string AppVersion
{
get
{
return NSBundle.MainBundle.ObjectForInfoDictionary("CFBundleVersion").ToString();
}
}
public static string CurrentVersion
{
public class BaseDialogViewController : DialogViewController
{
public BaseDialogViewController () : this(null, false)
{
}
public BaseDialogViewController(RootElement root, bool pushing) : base(root, pushing) {}
public override void ViewWillAppear (bool animated)
{
public static void SetAppearance()
{
if (Util.IsIOS5OrBetter)
{
UINavigationBar.Appearance.SetBackgroundImage(
Resources.NavBarHeaderBackground,
UIBarMetrics.Default);
UIBarButtonItem.Appearance.SetBackgroundImage(
Resources.BarButtonNormal.CreateResizableImage(new UIEdgeInsets(0,5,0,5)),