In the development mode, you can download the slices of all sizes for different platforms in one-click. (Please note: only Web and iOS/Android devices supported).
The slice-cutting calculation rule works only when “Auto convert size according to the platform” and “Customize size” is not enabled.
When uploading a design layout using Mockplus Cloud plugin, you can preset the size of iOS or Android for the design page.
As an example, let's take a 200x200px slice in an iPhone8 design page (375×667). Select iOS @1x when uploading.
Since we've selected iOS @1X on the Mockplus Cloud's Upload design page, the default size of the slice will be iOS@1x in Mockplus Cloud storyboard. Therefore, if you want to download all sizes for the iOS slice, the sizes of iOS @2x and iOS @3x should be 2 times and 3 times larger than 200x200px respectively.
Since iOS @1x corresponds to Android mdpi, when all Android sizes of the slice are downloaded, the size of hdpi and xhdpi will be 1.5 times and 2 times of 200x200px respectively, and so on.
Auto convert size according to platform
There are three methods to auto convert size according to the platform:
Method 1:
Select any layer and enable “Auto convert size according to platform” on the right panel:
Method 2:
Select assets on the right panel and enable “Auto convert size according to platform”:
Method 3:
Download all assets by clicking “Download” in the upper right corner of the screen and enable “Auto convert size according to platform” in the pop-up panel:
Calculation rule
When ”Auto convert size according to platform” is enabled, the calculation rules will be changed, as shown below:
After switching to the Android device and enabling “Auto convert size according to platform”, you can download all Android sizes of the slice: