Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Anchor constraint updates
-
Some more constraint updates:
- When you do not want the Apple standard 8 pt gap between two views,
at
anddock
have a newtight
property, which can be used like this:
at(this_view).tight.top = at(the_other_view).top dock(this_view).tight.below(the_other_view)
- Since views are in their superviews' coordinates, it can be hard to align views that are in different branches of the view hierarchy. Added a way to go via the screen coordinates (using
ui.convert_point
):
at(this_view).top = at(the_other_view).top + screen_x
Alternatives here are
screen
when you have a point (likecenter
) andscreen_x
/screen_y
for single values like in the example above.- Less general, but useful for my project, attributes that react to scrolling of ScrollViews and TableViews:
at(this_tableview).content_y = at(that_scrollview).content_y
Options here are
content_offset
for the overall scroll position, orcontent_x
/content_y
for just the one dimension. - When you do not want the Apple standard 8 pt gap between two views,
-
This post is deleted! -
@mikael , I regularly use your modules and I thank you for it. Unfortunately, since the last version of ui3, I have an error when I want to use it.
Here is the Traceback :Traceback (most recent call last): File "/private/var/mobile/Library/Mobile Documents/iCloud~com~omz-software~Pythonista3/Documents/ui3-master/sheet.py", line 7, in <module> from ui3.anchor import * File "/private/var/mobile/Library/Mobile Documents/iCloud~com~omz-software~Pythonista3/Documents/ui3-master/ui3/__init__.py", line 12, in <module> from ui3.anchor import * File "/private/var/mobile/Library/Mobile Documents/iCloud~com~omz-software~Pythonista3/Documents/ui3-master/ui3/anchor/__init__.py", line 821, in <module> via_screen, NameError: name 'via_screen' is not defined ```
-
@Enez-Houad, looks like I missed a push. Sorry for the hassle, please update now.
-
@mikael Thanks for your reactivity !