![]() Your next step is to set up views for each element in the storyboard. Open it and replace the contents with the following:Īs you can see, using StyleKits saves you save tons of code in your subclasses, and working with custom views becomes a breeze.īuild your project just to make sure that everything compiles correctly. Easy, eh? :]Ĭreate another new Swift file named StopwatchHand.swift. This uses the StyleKit helper code generated by PaintCode to draw the stopwatch body. ![]() Open it and replace the contents with the following: ![]() Once you’ve added the Swift file to your project, create a new Swift file named Stopwatch.swift. If you did our PaintCode Tutorial for Designers: Getting Started: Add the file you exported from in the previous tutorial into your project.If you did not do our PaintCode Tutorial for Designers: Getting Started: Download this pre-exported code and add it to your project.Imagine your designer has already created a stopwatch control for you in PaintCode, and has exported the StyleKit for your use. You have new, powerful variables for your generated controls or assets, standard colors that other elements in your app can access and use, along with cleaner source files.You’re provided with an improved, faster workflow for designing and prototyping your assets.You can easily make tweaks in PaintCode, re-export those changes, and immediately see results in your project.You no longer need to manually copy and paste your drawing code from PaintCode into a subclass.StyleKit gives you a few advantages over the old way of doing things in the previous version of PaintCode: StyleKit is a recent feature in PaintCode that allows you to export your drawing methods, color, gradients, and assets into an easily reusable class that you can add to your project. In this tutorial, you will only be working with the first view controller, where you will put the stopwatch control. Main.storyboard has a tab bar controller with three view controllers. Open up the project in Xcode and check out the basic structure and contents of the app. Getting Startedĭownload the starter project for this tutorial here. If you are new to iOS development or Auto Layout, check out some of our other iOS tutorials first. System Requirements for PaintCode 3 for Macĭownload PaintCode for Mac free latest full version offline direct download link full offline setup by clicking the below button.Note: This tutorial assumes you are an intermediate to advanced iOS developer and are familiar with Auto Layout, so some instructions are abbreviated.
0 Comments
Leave a Reply. |