This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#output').text('Ready'); | |
var splitArgList = function (s) { | |
var first_paren = s.indexOf('(') + 1; | |
var opening = s.substring(0, first_paren).trim(); | |
var args_closing = s.substring(first_paren); | |
var last_paren = args_closing.lastIndexOf(')'); | |
var args = args_closing.substring(0, last_paren) | |
var closing = args_closing.substring(last_paren).trim(); | |
return [opening, args, closing]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Unplugged | |
{ | |
public abstract class ListPickerViewModel<TItem> : UIPickerViewModel | |
{ | |
public TItem SelectedItem { get; private set; } | |
IList<TItem> _items; | |
public IList<TItem> Items | |
{ | |
get { return _items; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using MonoTouch.UIKit; | |
public sealed class UIViewAnimations : IDisposable | |
{ | |
public UIViewAnimations(bool enabled) | |
{ | |
_wasEnabled = UIView.AnimationsEnabled; | |
UIView.AnimationsEnabled = enabled; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static public UIImage StringToImage(string s, float fontSize) | |
{ | |
return StringToImage(s, UIFont.FromName("Helvetica", fontSize)); | |
} | |
static public UIImage StringToImage(string s, UIFont font) | |
{ | |
var ns = new NSString(s); | |
var size = ns.StringSize(font); | |
UIGraphics.BeginImageContext(size); |
NewerOlder