You will be asked to configure a bridging header file - click Yes. An .h file will be created following the naming convention: YourProjectName-Bridging-Header. Include the following lines in that file:
var chart =
Everything is similar to Objective-C, you can use all Cocoa Touch frameworks and APIs. The named parameters are also here, but there are fewer braces and no semicolons :)
In order to show the chart, we should add some data. The following lines will create a simple sine wave:
var y =
As you can see even constants like M_PI are available. Its interesting that you can change the (..)two dots in the for cycle with (...)three dots. This way you will include also the final value when iterating.
You should create a series in order to add this data in the chart:
var series =
var xAxis =
And the result is here:
The full sample code is available on our git repository.
You can download Telerik UI for iOS here.
So, this is it. Using Swift is really easy and intuitive.
Nikolay Diyanov Diyanov is the Product Manager of the Native Mobile UI division at Progress. Delivering outstanding solutions that make developers' lives easier is his passion and the biggest reward in his work. In his spare time, Nikolay enjoys travelling around the world, hiking, sun-bathing and kite-surfing.
Find him on Twitter @n_diyanov or on LinkedIn.
Copyright © 2016, Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.