Skip to content

Instantly share code, notes, and snippets.

View luiseduardohd's full-sized avatar
🎯
Focusing

Luis Hernandez luiseduardohd

🎯
Focusing
View GitHub Profile
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
{
module EasyLayout
open System
open System.Drawing
open Microsoft.FSharp.Quotations
open Microsoft.FSharp.Quotations.Patterns
open Microsoft.FSharp.Quotations.DerivedPatterns
open MonoTouch.Foundation
open MonoTouch.UIKit
ContentView.ConstrainLayout (() =>
border.Frame.Top == ContentView.Frame.Top &&
border.Frame.Height == 0.5f &&
border.Frame.Left == ContentView.Frame.Left &&
border.Frame.Right == ContentView.Frame.Right &&
nameLabel.Frame.Left == ContentView.Frame.Left + hpad &&
nameLabel.Frame.Right == ContentView.Frame.GetMidX () - 5.5f &&
nameLabel.Frame.Top >= ContentView.Frame.Top + vpad &&
@luiseduardohd
luiseduardohd / StoryboardUtils.cs
Last active August 29, 2015 14:04
Storyboard UIStoryboard file format c#
using System;
using System.Collections.Generic;
using MonoTouch.UIKit;
using System.Drawing;
using MonoTouch.MapKit;
using MonoTouch.Foundation;
//Storyboard File Format
using MonoTouch.ObjCRuntime;
using System.Xml.Serialization;
@luiseduardohd
luiseduardohd / UIViewController Category for Screenshots
Created September 22, 2014 20:23
Drag&Drop solution, take screenshot of any UIViewController in app with categories and reflection. (subclass must call [super viewDidAppear:animated]; )
//
// AppDelegate.m
// ScreenshotFramework
//
// Created by Luis Eduardo Hernandez Diaz on 15/04/13.
// Copyright (c) 2013 Luis Eduardo Hernandez Diaz. All rights reserved.
//
#import "AppDelegate.h"
//#import "draw2D.h"
@luiseduardohd
luiseduardohd / SimulatedTransparentViewController
Created October 16, 2014 21:50
This makes uiviewcontroller appears like popup.
// This file has been autogenerated from parsing an Objective-C header file added in Xcode.
using System;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using System.Collections.Generic;
using MonoTouchPlus;
using System.Drawing;
@luiseduardohd
luiseduardohd / Merry Christmas and Happy new Year
Created January 1, 2016 05:21
Merry Christmas and Happy new Year
set fbUrl to "https://www.facebook.com/messages/"
set return to "https://www.facebook.com/messages/"
--Key codes
--http://apple.stackexchange.com/questions/36943/how-do-i-automate-a-key-press-in-applescript
--http://softwares.bajram.com/softwares/#Full_Key_Codes
--Voy en la fila 30 del excel
--androidverde falta
--después de como 60 me marco facebook que necesito validar que no soy un robot
--me quede en yaquelin weber
--despues de 30 marco eso.
@luiseduardohd
luiseduardohd / Wizeline problem
Created July 21, 2016 16:23
Wizeline interview problem
using System;
namespace TestWize
{
class MainClass
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
@luiseduardohd
luiseduardohd / XamarinSwizzle.cs
Created November 25, 2017 11:52
Xamarin swizzle
using System;
using System.Runtime.InteropServices;
using MonoTouch.ObjCRuntime;
using MonoTouch.Foundation;
namespace XamarinSwizzle
{
[Register("TestClass")]
public class TestCode : NSObject
{
@luiseduardohd
luiseduardohd / AsyncObservableCollection.cs
Created May 16, 2020 19:35
AsyncObservableCollection
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.Serialization;
using System.Threading;