SCNScene scene;
SCNView sceneView;
SCNCamera camera;
SCNNode cameraNode;
public override void ViewDidLoad ()
{
scene = SCNScene.FromFile ("duck", "ColladaModels.scnassets", new SCNSceneLoadingOptions ());
This file contains 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 FSHelloSceneKit | |
open System | |
open MonoTouch.UIKit | |
open MonoTouch.Foundation | |
open MonoTouch.SceneKit | |
type FSHelloSceneKitViewController () = | |
inherit UIViewController() | |
This file contains 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
rollin in C.T. ...VW in gear 3 | |
pickin up the milk, the produce, and some tea | |
dropin crazy rhymes, while I'm running out of time | |
got my wife some flowers, forgot the movie, but got Amazon Prime | |
hey ho | |
but got Amazon Prime | |
hey ho | |
but got Amazon Prime |
This file contains 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
I'm waiting and I'm waiting for my Apple review. | |
I'm going to get rejected and so are you. | |
I'm waiting and I'm waiting for my Apple review. | |
I have no watch. There's not much I can do. | |
I'm waiting and I'm waiting for my Apple review. | |
I may as well have built an app for a kazoo. |
This file contains 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
NetDelegate _netDel; | |
NSNetService _ns; | |
void InitNetService () | |
{ | |
_ns = new NSNetService ("", "_testservice._tcp", UIDevice.CurrentDevice.Name, 9999); | |
_netDel = new NetDelegate (); | |
_ns.Delegate = _netDel; | |
// add TXTRecordData |
This file contains 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 NSArray ToNSArray (int[] array) | |
{ | |
NSArray nsArray = null; | |
var objects = Array.ConvertAll (array, i => (object)i); | |
if (objects != null) { | |
nsArray = NSArray.FromObjects (objects); | |
} | |
return nsArray; |
This file contains 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
//does the actual coloring | |
void DrawPoints (CGContext dctx) | |
{ | |
dctx.BeginPath (); | |
dctx.MoveTo (Points.First().X, Points.First().Y); | |
dctx.SetLineWidth(swatchSlider.Value); | |
dctx.SetBlendMode (CGBlendMode.Normal); | |
foreach (var crayon in Crayons) { |
public static class AutolayoutHelper
{
[DllImport (Constants.ObjectiveCLibrary, EntryPoint = "objc_msgSend")]
static extern IntPtr IntPtr_objc_msgSend (IntPtr receiver, IntPtr selector);
public static void AutoLayoutTrace ()
{
var trace = Runtime.GetNSObject (IntPtr_objc_msgSend (UIApplication.SharedApplication.KeyWindow.Handle, new Selector ("_autolayoutTrace").Handle));
This file contains 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
NSError err; | |
ab = ABAddressBook.Create (out err); | |
if (err == null) { | |
ab.RequestAccess ((allowed, err1) => { | |
if (allowed) { | |
var people = ab.GetPeople (); | |
foreach (ABPerson person in people) { |
This file contains 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
NSError error = null; | |
var htmlString = new NSAttributedString (NSUrl.FromFilename ( | |
"Test.html"), | |
new NSAttributedStringDocumentAttributes{ DocumentType = NSDocumentType.HTML }, | |
ref error); | |
textView.AttributedText = htmlString; |
OlderNewer