Skip to content

@GettingStarted~iOS

XDeveloper edited this page Aug 27, 2018 · 2 revisions

Getting Started with Xamarin.iOS

Visual Studio for Mac is recommended because the iOS Simulator comes free of charge!

  1. Create a Xamarin.iOS project. Choose a Single View App to start.

Create

  1. After going through the configuration window, open the Add Packages... window and install CSharpMath.Ios.

Add package Install package

  1. After installation, open ViewController.cs.

Open file

  1. Add
var latexView = CSharpMath.Ios.IosMathLabels.MathView(@"x = -b \pm \frac{\sqrt{b^2-4ac}}{2a}", 15);
latexView.ContentInsets = new UIEdgeInsets(10, 10, 10, 10);
var size = latexView.SizeThatFits(new CoreGraphics.CGSize(370, 180));
latexView.Frame = new CoreGraphics.CGRect(new CoreGraphics.CGPoint(0, 20), size);
this.Add(latexView);

below // Perform any additional setup after loading the view, typically from a nib. under the ViewDidLoad() method.

Add code

  1. Click the arrow button to run.

Result

  1. Discover what you can do