24.10.2014 Views

TMS iCL DEVELOPERS GUIDE - TMS Software

TMS iCL DEVELOPERS GUIDE - TMS Software

TMS iCL DEVELOPERS GUIDE - TMS Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>TMS</strong> SOFTWARE<br />

<strong>TMS</strong> <strong>iCL</strong><br />

<strong>DEVELOPERS</strong> <strong>GUIDE</strong><br />

PushViewController(AViewController:<br />

T<strong>TMS</strong>FMXNativeUIViewController; AAnimated:<br />

Boolean);<br />

PopViewController<br />

Pushes a ViewController on the stack with<br />

optional animation.<br />

Pops the last added ViewController on the stack<br />

with optional animation.<br />

Public Properties<br />

NavigationController<br />

Returns a reference to the native iOS<br />

UINavigationController.<br />

Published Events<br />

OnDrawRect<br />

Event to perform custom drawing inside the<br />

NavigationController.<br />

Pushing and popping pages (ViewControllers)<br />

The NavigationController can be filled with Pages and has a toolbar at the top. The pages can be<br />

pushed and popped from the main NavigationController through code. You can add as many pages as<br />

you wish by adding a T<strong>TMS</strong>FMXNativeUIViewController for each page. Below is a sample with 3<br />

pages.<br />

Drop an instance of T<strong>TMS</strong>FMXNativeUINavigationController and 2 instances of<br />

T<strong>TMS</strong>FMXNativeUIViewController on the form. Set the title for each controller like the sample below:<br />

<strong>TMS</strong>FMXNativeUINavigationController1.Title := ‘First Page’;<br />

<strong>TMS</strong>FMXNativeUIViewController1.Title := ‘Second Page’;<br />

<strong>TMS</strong>FMXNativeUIViewController2.Title := ‘Third Page’;<br />

Add a <strong>TMS</strong>FMXNativeUIButton instance as a child of the first page, the<br />

<strong>TMS</strong>FMXNativeUINavigationController. In the OnClick event, add the following code:<br />

<strong>TMS</strong>FMXNativeUINavigationController1.PushViewController(<strong>TMS</strong>FMXNativeU<br />

IViewController1, True);<br />

This will push the second page in place and update the toolbar with a back button. The back button<br />

will allow you to navigate to the previous page. This can also be done with the second page by<br />

dropping a button on the first page and adding the code:<br />

93

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!