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
var imageView = new UIImageView (); | |
imageView.Frame = UIScreen.MainScreen.Bounds; | |
imageView.ContentMode = UIViewContentMode.ScaleAspectFit; | |
var qrCode = new CIQRCodeGenerator { | |
Message = NSData.FromString ("test"), | |
CorrectionLevel = "Q" | |
}.OutputImage; | |
UIGraphics.BeginImageContext (new SizeF (qrCode.Extent.Width * 8, qrCode.Extent.Height * 8)); |
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
using System; | |
using MonoTouch.UIKit; | |
using MonoTouch.SceneKit; | |
using MonoTouch.Foundation; | |
namespace HelloSceneKit | |
{ | |
public class HelloSceneKitController : UIViewController | |
{ | |
SCNView sceneView; |
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
using System; | |
using System.Drawing; | |
using MonoTouch.UIKit; | |
namespace ViewEffectsDemo | |
{ | |
public class EffectsController : UIViewController | |
{ | |
UIImageView imageView; | |
UIScrollView scrollView; |
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
using System; | |
using System.Drawing; | |
using MonoTouch.Foundation; | |
using MonoTouch.UIKit; | |
namespace CollectionViewWithControllerDemo | |
{ | |
public class Controller : UIViewController | |
{ | |
CVSource source; |
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
import 'package:flutter/material.dart'; | |
void main() { | |
runApp( | |
Container( | |
color: Colors.lightBlue, | |
child: Padding( | |
padding: const EdgeInsets.fromLTRB(0.0, 50.0, 0.0, 0.0), | |
child: Directionality( |
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
using System; | |
using MonoTouch.CoreImage; | |
using MonoTouch.UIKit; | |
namespace CIDetectorsDemo | |
{ | |
public class DetectorController : UIViewController | |
{ | |
UIImageView imageView; |
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
var qrCode = new CIQRCodeGenerator { | |
Message = NSData.FromString (someText), | |
CorrectionLevel = "Q" | |
}.OutputImage; | |
UIGraphics.BeginImageContext (new SizeF (qrCode.Extent.Width * 8, qrCode.Extent.Height * 8)); | |
var cgCtx = UIGraphics.GetCurrentContext (); | |
var ciCtx = CIContext.FromOptions (null); | |
cgCtx.InterpolationQuality = CGInterpolationQuality.None; | |
cgCtx.DrawImage (cgCtx.GetClipBoundingBox (), ciCtx.CreateCGImage (qrCode, qrCode.Extent)); |
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; |
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) { |
NewerOlder