

- #Macbook ios paintcode how to
- #Macbook ios paintcode update
- #Macbook ios paintcode code
- #Macbook ios paintcode trial
The origin of your progress elements will depend upon this property.Ĭlick Frame in the Browser pane on the right side.
#Macbook ios paintcode code
Look at the generated code in the Code section at the bottom of the screen it has a method header with a frame property. In the top toolbar, click the Frame button and then click anywhere within the gray progress bar. Using PaintCode, you can then adjust how objects, such as your progress bar’s rectangle, resize within the frame. When you create a frame, PaintCode encloses the generated drawing code into a method where one of the parameters is the frame’s rectangle. However, you probably want this control to resize for different screen sizes. For example, you’ve created a progress bar that’s exactly 288 pixels wide. Your progress bar should look like the following:įrames in PaintCode let you to create flexible elements. Select a Fill color and click the x next to Stroke to remove it: In the Inspector, change the name of the rectangle to Progress Active, the Radius to 5, the X and Y values to 1, Width to 288, and Height to 10. Next up – a second rectangle for the song progress indicator.Ĭlick the Rect button in the toolbar and then click and drag inside of your canvas. You’ll change the final color once you’ve finished creating the progress bar.Ĭheck out your canvas and you should have something that resembles the following image: Set the Fill color to No Fill and assign any color you like to Stroke: Set the Radius to 5, then modify the position and size of the rectangle to have X and Y values of 1, Width of 288, and Height of 10.

Don’t worry about how things look just yet – you’ll use the Inspector to fix that.Ĭlick on the newly created rectangle to select it, then use the Inspector to change the name of the rectangle to Progress Outline. In the toolbar at the top, click on the Rect button (the left-most button), then click and drag inside the canvas to create a rectangle. The second rectangle will be a solid fill, which will indicate how much of the song track has been played. The first rectangle will be a stroke outline of the entire progress bar. The basic elements that make up the progress bar are two rectangles with a corner radius. Your canvas is now the correct size for the progress bar you’ll be making in this tutorial.

Use the Inspector to rename the canvas to Progress Bar and set the Width to 290 and the Height to 13: It’s always interesting to see the generated code as you move through the tutorial – if nothing else, it’s a cool way of learning Core Graphics! :] Then open PaintCode and create a new document by going to File\New on the main menu.Įnsure that your PaintCode screen is set up with the Library on the left and that the Code panel at the bottom is visible and set to iOS > Swift.
#Macbook ios paintcode trial
The free trial will not work for this tutorial it has a number of restrictions such as the inability to copy/paste, the inability to export code, and more. Without further, it’s time to get started on your custom progress bar! Getting Startedįirst make sure you have a paid copy of PaintCode.
#Macbook ios paintcode update
You can still follow along with the simulator, but you won’t be able to see the progress bar update in real time. To properly test Songy, you will need a physical iOS device with at least one song stored in your music library. You’ll then add this progress bar to Songy, a music player app, to show the progress of the song playing from your device’s music library. In this intermediate PaintCode tutorial, you’ll draw a dynamic custom progress bar in PaintCode. You learned a lot but that only scratches the surface of what PaintCode can do!
#Macbook ios paintcode how to
As you may know, PaintCode is a fantastic little Mac app that turns your vector graphic designs into Core Graphics code you can easily use in your iOS apps.Ī while back we wrote a PaintCode tutorial for designers and a PaintCode tutorial for developers that taught you how to create and animate a stop watch control in PaintCode, and integrate it into your own iOS app.
