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
Here is what you need to do to register your app for a custom URL scheme (for the example we will use a "myapp" scheme). | |
1) In your Info.plist, add a new entry for CFBundleURLTypes: | |
<key>CFBundleURLTypes</key> | |
<array> | |
<dict> | |
<key>CFBundleURLName</key> | |
<string>MyApp's URL</string> | |
<key>CFBundleURLSchemes</key> |
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
@IBDesignable | |
class TranslateResizeMaskToConstraints: UIView { | |
@IBInspectable var Enabled:Bool = false | |
private var _interfaceBuilderContext = false | |
override func awakeFromNib() { | |
super.awakeFromNib() | |
setTranslatesAutoresizingMaskIntoConstraints(Enabled || _interfaceBuilderContext) |
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
<!DOCTYPE html> | |
<head> | |
<title>Stay Standalone</title> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
<script src="stay_standalone.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<ul> | |
<li><a href="http://google.com/">Remote Link (Google)</a></li> |
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
///<summary>Allows slim locks to be requesed using(LOCK.WriteLock()){ ... } syntax</summary> | |
public static class LockExtensions | |
{ | |
public class DisposableCallback : IDisposable | |
{ | |
public void Dispose () | |
{ | |
_callback (); | |
} |
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
public class FontCreator | |
{ | |
private string _fontName; | |
private Dictionary<float, UIFont> _lookup = new Dictionary<float, UIFont> (); | |
public FontCreator (string fontName) | |
{ | |
_fontName = fontName; | |
} |
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 System.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using MonoTouch.UIKit; | |
using System.Reflection; | |
using MonoTouch.Foundation; | |
namespace Praeclarum.UI | |
{ |
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 System.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using MonoTouch.UIKit; | |
namespace Async.iOS | |
{ | |
public static class Layout | |
{ |
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
// this is required in order to properly escape | |
// jade interpolation | |
jade = { | |
escape: function(html){ | |
return String(html) | |
.replace(/&/g, '&') | |
.replace(/</g, '<') | |
.replace(/>/g, '>') | |
.replace(/"/g, '"'); | |
} |
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
var proc = null; | |
grunt.registerTask('supervisor', function(){ | |
if(!proc){ | |
proc = grunt.util.spawn(this.options()); | |
} | |
}); | |
grunt.initConfig({ | |
supervisor : { |
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 System.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using MonoTouch.UIKit; | |
namespace Async.iOS | |
{ | |
public static class Layout | |
{ |