From the course: iOS Development Tips

Unlock this course with a free trial

Join today to access over 23,200 courses taught by industry experts.

Core Graphics datatypes

Core Graphics datatypes

- [Instructor] After a previous tip on swift UI paths, I realized that not everyone has all the knowledge to use Core Graphics for drawing either in swift UI or UI kit. So I'm going to do a little bit of a mini series on Core Graphics. This week we're going to start by looking at the basic types you need to know for Core Graphics. I've made a playground to demonstrate these types you could find in the exercise files. There are four types you should know when working with Core Graphics, many you might have seen while working with other methods and properties in UI kit or swift UI. All of these are part of the Core Graphics framework. So you must import Core Graphics or a framework that uses it such as UI kit or swift UI. The most basic as I have up right now is CG float. And it's always a good idea to declare its type like I did here. So you've got something like var myXCGfloat equals a 100. And the reason for that is…

Contents