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 override void OnActivated (UIApplication application) | |
{ | |
//When your app is backgrounded, iOS takes a snapshot. | |
//When the app comes back from the background it shows this snapshot at launch until your app is ready | |
//Sometimes apple forgets to remove the splash screen. | |
//Your app is in the forground and working. To prove it you can rotate, and see half your real screen. | |
//To prevent this from happening you can manually remove the view | |
foreach (var w in application.Windows) { | |
if (w != null && w != window) { |
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 static void Log (Exception ex, ReportSeverity severity= ReportSeverity.Error, | |
[CallerMemberName] string memberName = "", | |
[CallerFilePath] string sourceFilePath = "", | |
[CallerLineNumber] int sourceLineNumber = 0) | |
{ | |
try{ | |
Console.WriteLine (ex); | |
Console.WriteLine("{0} - {1} - {2} \r\n {3}",sourceFilePath,memberName,sourceLineNumber,ex); |
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
NSInternalInconsistencyException Reason: Only RGBA or White color spaces are supported in this situation. |
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 UNIFIEDAPI | |
using UIKit; | |
using CoreLocation; | |
using CoreGraphics; | |
#else | |
using MonoTouch.UIKit; | |
using System.Drawing; | |
using MonoTouch.CoreLocation; | |
#endif |
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
static List<AVAudioPlayer> players = new List<AVAudioPlayer>(); | |
static async Task<bool> PlayAudioFile(string path) | |
{ | |
var tcs = new TaskCompletionSource<bool> (); | |
var player = AVAudioPlayer.FromUrl (NSUrl.FromFilename (path)); | |
players.Add (player); | |
player.FinishedPlaying += (object sender, AVStatusEventArgs e) => { | |
Console.WriteLine ("done"); | |
tcs.TrySetResult(true); | |
}; |
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 static class ButtonExtensions | |
{ | |
public static Button OnTap(this Button button, Action tapped) | |
{ | |
button.Clicked += (s, e) => tapped (); | |
return button; | |
} | |
} |
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 System.Collections; | |
using System.Collections.Specialized; | |
using System.Diagnostics; | |
using MonoTouch.Foundation; | |
using MonoTouch.UIKit; | |
namespace Praeclarum.UI | |
{ |
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 abstract class StoryBoardRenderer<T> : UIViewController, IViewRenderer where T : UIViewController | |
{ | |
string storyboardName; | |
string viewControllerStoryBoardId; | |
public StoryBoardRenderer (string storyboard, string viewControllerStoryBoardId = "") | |
{ | |
this.viewControllerStoryBoardId = viewControllerStoryBoardId; |
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 NUnit.Framework; | |
using System.Threading.Tasks; | |
using System.Threading; | |
using NUnit.Framework.Constraints; | |
namespace gMusic | |
{ | |
[TestFixture] | |
public class SignInTests |
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
/* | |
var options = new [] { | |
Priority.Low, | |
Priority.Normal, | |
Priority.High, | |
}; | |
var sheet = new SimpleActionSheet { | |
Title = file.ToString() |