├── README.md ├── ipad-pro.pyui ├── ipads-non-pro.pyui ├── iphone-4,4S.pyui ├── iphone-5,5S.pyui ├── iphone-6+,6S+.pyui ├── iphone-6,6S.pyui └── ui-templater.py /README.md: -------------------------------------------------------------------------------- 1 | # Pythonista-UI-Templates 2 | Provides blank `.pyui` files for all iOS device screen sizes. 3 | 4 | `ui-templater.py` is an editor action. Add it, then navigate to whatever project you're working on that needs a device-sized template. When you run the action, just choose a device, and you'll magically have a `.pyui` file of the appropriate size waiting for you. 5 | -------------------------------------------------------------------------------- /ipad-pro.pyui: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "selected" : false, 4 | "frame" : "{{0, 0}, {1366, 1024}}", 5 | "class" : "View", 6 | "nodes" : [ 7 | 8 | ], 9 | "attributes" : { 10 | "enabled" : true, 11 | "background_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)", 12 | "tint_color" : "RGBA(0.000000,0.478000,1.000000,1.000000)", 13 | "border_color" : "RGBA(0.000000,0.000000,0.000000,1.000000)", 14 | "flex" : "" 15 | } 16 | } 17 | ] -------------------------------------------------------------------------------- /ipads-non-pro.pyui: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "selected" : false, 4 | "frame" : "{{0, 0}, {1024, 768}}", 5 | "class" : "View", 6 | "nodes" : [ 7 | 8 | ], 9 | "attributes" : { 10 | "enabled" : true, 11 | "background_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)", 12 | "tint_color" : "RGBA(0.000000,0.478000,1.000000,1.000000)", 13 | "border_color" : "RGBA(0.000000,0.000000,0.000000,1.000000)", 14 | "flex" : "" 15 | } 16 | } 17 | ] -------------------------------------------------------------------------------- /iphone-4,4S.pyui: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "selected" : false, 4 | "frame" : "{{0, 0}, {320, 480}}", 5 | "class" : "View", 6 | "nodes" : [ 7 | 8 | ], 9 | "attributes" : { 10 | "enabled" : true, 11 | "background_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)", 12 | "tint_color" : "RGBA(0.000000,0.478000,1.000000,1.000000)", 13 | "border_color" : "RGBA(0.000000,0.000000,0.000000,1.000000)", 14 | "flex" : "" 15 | } 16 | } 17 | ] -------------------------------------------------------------------------------- /iphone-5,5S.pyui: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "selected" : false, 4 | "frame" : "{{0, 0}, {320, 568}}", 5 | "class" : "View", 6 | "nodes" : [ 7 | 8 | ], 9 | "attributes" : { 10 | "enabled" : true, 11 | "background_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)", 12 | "tint_color" : "RGBA(0.000000,0.478000,1.000000,1.000000)", 13 | "border_color" : "RGBA(0.000000,0.000000,0.000000,1.000000)", 14 | "flex" : "" 15 | } 16 | } 17 | ] -------------------------------------------------------------------------------- /iphone-6+,6S+.pyui: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "selected" : false, 4 | "frame" : "{{0, 0}, {414, 736}}", 5 | "class" : "View", 6 | "nodes" : [ 7 | 8 | ], 9 | "attributes" : { 10 | "enabled" : true, 11 | "background_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)", 12 | "tint_color" : "RGBA(0.000000,0.478000,1.000000,1.000000)", 13 | "border_color" : "RGBA(0.000000,0.000000,0.000000,1.000000)", 14 | "flex" : "" 15 | } 16 | } 17 | ] -------------------------------------------------------------------------------- /iphone-6,6S.pyui: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "selected" : false, 4 | "frame" : "{{0, 0}, {375, 667}}", 5 | "class" : "View", 6 | "nodes" : [ 7 | 8 | ], 9 | "attributes" : { 10 | "enabled" : true, 11 | "background_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)", 12 | "tint_color" : "RGBA(0.000000,0.478000,1.000000,1.000000)", 13 | "border_color" : "RGBA(0.000000,0.000000,0.000000,1.000000)", 14 | "flex" : "" 15 | } 16 | } 17 | ] -------------------------------------------------------------------------------- /ui-templater.py: -------------------------------------------------------------------------------- 1 | import editor 2 | import os 3 | import dialogs 4 | import shutil 5 | 6 | curdir=os.path.dirname(editor.get_path()) 7 | 8 | options=["iPads (non pro)", 9 | "iPad Pro", 10 | "iPhone 4, iPhone 4S", 11 | "iPhone 5, iPhone 5S", 12 | "iPhone 6, iPhone 6S", 13 | "iPhone 6+, iPhone 6S+", 14 | ] 15 | 16 | pyuiFiles=[ 17 | "ipads-non-pro.pyui", 18 | "ipad-pro.pyui", 19 | "iphone-4,4S.pyui", 20 | "iphone-5,5S.pyui", 21 | "iphone-6,6S.pyui", 22 | "iphone-6+,iphone-6S+.pyui", 23 | ] 24 | 25 | mapChoicesToFiles=dict(zip(options,pyuiFiles)) 26 | 27 | title="Choose a screen size" 28 | choice=mapChoicesToFiles[ dialogs.list_dialog(title,options) ] 29 | 30 | shutil.copy(choice,os.path.join(curdir,choice)) 31 | --------------------------------------------------------------------------------