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
//https://stackoverflow.com/questions/25532870/xamarin-ios-memory-leaks-everywhere?rq=1 | |
public static void DisposeEx(this UIView view) { | |
const bool enableLogging = false; | |
try { | |
if (view.IsDisposedOrNull()) | |
return; | |
var viewDescription = string.Empty; |
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.Generic; | |
using System.Linq; | |
using MonoTouch.MessageUI; | |
using MonoTouch.UIKit; | |
namespace MyApp | |
{ | |
public interface ICanCleanUpMyself | |
{ |
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.Threading.Tasks; | |
using Foundation; | |
namespace UIKit | |
{ | |
public static class UITableView_ScrollToAndSelectRow | |
{ | |
private static TimeSpan CabalisticDelay => TimeSpan.FromSeconds(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
namespace UIKit | |
{ | |
public static class UITableView_SelectCell | |
{ | |
public static void SelectCell(this UITableView @this, UITableViewCell cell) | |
{ | |
var index = @this.IndexPathForCell(cell); | |
@this.SelectRow(index, true, UITableViewScrollPosition.None); | |
@this.Delegate.RowSelected(@this, index); | |
} |
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
namespace UIKit | |
{ | |
/// <summary> | |
/// Xamarin.IOS extension that gets the parent <see cref="UITableView"/> from the <see cref="UITableViewCell"/> | |
/// </summary> | |
/// <seealso cref="https://stackoverflow.com/questions/15711645/how-to-get-uitableview-from-uitableviewcell"/> | |
public static class UITableViewCell_GetTableView | |
{ | |
/// <summary> | |
/// Gets the parent <see cref="UITableView"/> |
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.Collections.Generic; | |
namespace System.Linq | |
{ | |
/// <summary> | |
/// Filtering out values from a C# Generic Dictionary | |
/// </summary> | |
/// <seealso cref="https://stackoverflow.com/questions/2131648/filtering-out-values-from-a-c-sharp-generic-dictionary"/> | |
public static class IDictionary_WhereToDictionary | |
{ |
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.IO; | |
using System.Reflection; | |
namespace Core.Utils | |
{ | |
public static class EmbeddedResource | |
{ | |
public static string ReadString(Assembly assembly, string @namespace ,string filename) | |
{ | |
var stream = assembly.GetManifestResourceStream($"{@namespace}.{filename}"); |
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 UIKit; | |
namespace UIKit | |
{ | |
public static class UITableViewCell_GetUITableView | |
{ | |
/// <summary> | |
/// Get the <see cref="UITableView"/> associated with this cell. | |
/// </summary> | |
/// <param name="this"></param> |
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 Android.Widget; | |
namespace App.Droid.Extensions | |
{ | |
/// <summary> | |
/// Extension method ShowSuggestions to AutoCompleteTextView | |
/// </summary> | |
/// <seealso cref="https://stackoverflow.com/questions/2126717/android-autocompletetextview-show-suggestions-when-no-text-entered"/> | |
public static class AutoCompleteTextView_ShowSuggestions | |
{ |
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 Java.Lang; | |
namespace App.Droid.Extensions | |
{ | |
/// <summary> | |
/// Extension method Cast for <see cref="Java.Lang.Object"/>. | |
/// </summary> | |
/// <seealso cref="https://stackoverflow.com/questions/6594250/type-cast-from-java-lang-object-to-native-clr-type-in-monodroid"/> | |
public static class JavaLangObject_Cast | |
{ |