Skip to content

Instantly share code, notes, and snippets.

@migueldeicaza
migueldeicaza / MyTextLabel.swift
Created January 26, 2021 03:47 — forked from CrystDragon/MyTextLabel.swift
Most basic custom UITextInput conformance, without selection interaction, no UI elements but only pure texts.
import UIKit
class MyTextLabel: UIView {
var textLayer = CATextLayer()
var textStorage: String = "" {
didSet {
textLayer.string = textStorage
}
}
@migueldeicaza
migueldeicaza / gist:4579408
Last active December 11, 2015 09:19 — forked from anonymous/gist:4515011
Simple AI loop using Async code, to use as basis on "How to avoid garbage with Async" post.
private async void Think()
{
Loop:
Program.MineCycles++;
Say("Walking to the mine!");
await this.WaitSeconds(2.0f);
Say("Entering the mine!");
await this.WaitSeconds(1.0f);
using System;
using System.Drawing;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
namespace RedparkSDK
{
[BaseType(typeof(NSObject))]
public interface RscMgrDelegate
@migueldeicaza
migueldeicaza / gist:1412888
Created December 1, 2011 02:23 — forked from spouliot/gist:1409463
System.Drawing combined API lists - Status Tracking
Members missing, based on Sebastien's list:
[Implemented methods have been removed]
Type: System.Drawing.Bitmap
.ctor(System.Int32,System.Int32)
GetPixel(System.Int32,System.Int32)
SetResolution(System.Single,System.Single)
Type: System.Drawing.Drawing2D.Blend
You appear to be advocating a new:
[ ] cloud-hosted [ ] locally installable [ ] web-based [ ] browser-based [ ] language-agnostic
[ ] language-specific IDE. Your IDE will not succeed. Here is why it will not succeed.
You appear to believe that:
[ ] Syntax highlighting is what makes programming difficult
[ ] Garbage collection is free
[ ] Computers have infinite memory
[ ] Nobody really needs: