This file contains hidden or 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.Drawing; | |
using MonoTouch.Foundation; | |
using MonoTouch.UIKit; | |
namespace HexagonApp { | |
[Register ("AppDelegate")] | |
class AppDelegate : UIApplicationDelegate { | |
UIWindow window; | |
public override bool FinishedLaunching (UIApplication app, NSDictionary options) { |
This file contains hidden or 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
<DotNetProjectSubtype | |
guid="{e613f3a2-fe9c-494f-b74e-f63bcb86fea6}" | |
type="MonoDevelop.IPhone.IPhoneProject" | |
migrationHandler="MonoDevelop.IPhone.IPhoneProjectMigrationHandler" /> | |
<DotNetProjectSubtype | |
guid="{6bc8ed88-2882-458c-8e55-dfd12b67127b}" | |
type="MonoDevelop.IPhone.IPhoneProject" /> | |
<DotNetProjectSubtype | |
guid="{f5b4f3bc-b597-4e2b-b552-ef5d8a32436f}" | |
type="MonoDevelop.IPhone.IPhoneBindingProject" |
This file contains hidden or 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
If you want to debug your Xamarin app using LLDB to get a backtrace, then do the following: | |
1) Clone https://github.com/zgramana/ios-deploy (or download https://www.dropbox.com/s/8fl1t1qc5fdg5tn/ios-deploy) | |
2) Run `make` inside that folder. | |
3) Run `./ios-deploy -d -b path/to/bin/iPhone/Debug/MyFoo.app` | |
This will install your app and start it will lldb attached. | |
From the lldb prompt: |
This file contains hidden or 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 BackgroundDownload | |
{ | |
public BackgroundDownload () | |
{ | |
} | |
NSUrlSessionDownloadTask downloadTask; | |
static NSUrlSession session; | |
public async Task DownloadFileAsync(Uri url, string destination) | |
{ | |
if (downloadTask != null) |
This file contains hidden or 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
ARGF.each do |l| | |
case l | |
when /public delegate void Exception(Argument)?Delegate/ | |
puts " [MonoTouch.MonoNativeFunctionWrapper]", l | |
when /static void SetPendingArgument(Null|OutOfRange)?Exception/ | |
puts " [MonoTouch.MonoPInvokeCallback (typeof (ExceptionArgumentDelegate))]", l | |
when /static void SetPending.*Exception/ | |
puts " [MonoTouch.MonoPInvokeCallback (typeof (ExceptionDelegate))]", l | |
when /static string CreateString/ | |
puts " [MonoTouch.MonoPInvokeCallback (typeof (SWIGStringDelegate))]", l |
This file contains hidden or 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
// | |
// EmailValidator.cs | |
// | |
// Author: Jeffrey Stedfast <[email protected]> | |
// | |
// Copyright (c) 2013 Xamarin Inc. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights |
This file contains hidden or 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; | |
using MonoTouch.CoreAnimation; | |
public class BrightlyBlurredUIView: UIView | |
{ | |
CALayer blurLayer,accentLayer; | |
UIView accentView; | |
UIToolbar toolbar; | |
public BrightlyBlurredUIView() |
This file contains hidden or 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
// | |
// Copyright (c) 2013-2015 Frank A. Krueger | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: | |
// |
This file contains hidden or 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
#!/usr/bin/env bash | |
# | |
# simple recursive search and replace string in files | |
# setup: alias replace='~/replace.sh' | |
# notes: you will need to escape special chars! eg: replace '\/dir1' '\/dir2' . | |
# usage: replace <oldstring> <newstring> <path> <depth> | |
# examples: | |
# replace "([^\s]+.php)" "\/\1" . | |
# replace "\"\/([^\/]+.php)" "\"\/dir\/\1" . |
This file contains hidden or 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.Foundation; | |
using MonoTouch.UIKit; | |
using MonoTouch.Dialog; | |
using System.IO; | |
using MonoTouch.MessageUI; | |
using System.Threading; | |
using MonoTouch.ObjCRuntime; | |
using System.Globalization; | |
using System.Xml.Linq; |