Skip to content

Instantly share code, notes, and snippets.

@migueldeicaza
migueldeicaza / MyTextLabel.swift
Created Jan 26, 2021 — forked from CrystDragon/MyTextLabel.swift
Most basic custom UITextInput conformance, without selection interaction, no UI elements but only pure texts.
View MyTextLabel.swift
import UIKit
class MyTextLabel: UIView {
var textLayer = CATextLayer()
var textStorage: String = "" {
didSet {
textLayer.string = textStorage
}
}
View gist:9755409
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:
@migueldeicaza
migueldeicaza / gist:4579408
Last active Dec 11, 2015 — forked from anonymous/gist:4515011
Simple AI loop using Async code, to use as basis on "How to avoid garbage with Async" post.
View gist:4579408
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);
View ApiDefinition.cs
using System;
using System.Drawing;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
namespace RedparkSDK
{
[BaseType(typeof(NSObject))]
public interface RscMgrDelegate
@migueldeicaza
migueldeicaza / gist:1412888
Created Dec 1, 2011 — forked from spouliot/gist:1409463
System.Drawing combined API lists - Status Tracking
View gist:1412888
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