sirhans Posted January 21, 2017 Share Posted January 21, 2017 Hi, I export UI design elements as slices from affinity designer and use them to design iOS apps. With each slice I export, I need to ensure that it's location in the Xcode interface builder is exactly the same as it was in affinity designer artboard. It would be wonderful if affinity designer wrote the x,y coordinates of each slice as it appears in the artboard into the file name. Then I could get pixel perfect layout in Xcode either by copying the coordinates by hand or by scripting something that derives the layout from the file name of the image. To do this, all you would need to do is add location variables to the export filename options in export persona. Adding just "top" and "left" would be sufficient. Top, left, right, bottom, centreX, and centreY would be even more complete. Users who want to use these variables could then easily construct their own file export naming schemes to encode location information. Thanks again for making great software Henry Stahle 1 Quote Link to comment Share on other sites More sharing options...
Henry Stahle Posted January 21, 2017 Share Posted January 21, 2017 Hi sirhans, I do not use artboards, only single images. The exported slices with the json script ends up as good as it does from Photoshop. The exported json script coordinates from Affinity is what I use for the (automated) setup in Spine and for the programmer use in LUA. Anyway I have to test the artboard slice export, since artboard would probably be of good use for me, to see what the script file looks like after slice / script export. Quote Link to comment Share on other sites More sharing options...
sirhans Posted January 21, 2017 Author Share Posted January 21, 2017 Hi. I saw the Json script option in affinity. But what is it? And how to use it? Could you share a link to a page that explains? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.