Skip to content

Commit

Permalink
Corrected some inheritance issues with iOS containers.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Aug 10, 2023
1 parent 10d4f09 commit 3c21869
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions iOS/src/toga_iOS/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ def refreshed(self):


class Container(BaseContainer):
def __init__(self, content=None, layout_native=None, on_refresh=None):
def __init__(self, content=None, layout_native=None, parent=None):
"""
:param content: The widget impl that is the container's initial content.
:param layout_native: The native widget that should be used to provide size
hints to the layout. This will usually be the container widget itself;
however, for widgets like ScrollContainer where the layout needs to be
computed based on a different size to what will be rendered, the source of
the size can be different.
:param on_refresh: The callback to be notified when this container's layout is
refreshed.
:param parent: The parent of this container; this is the object that will be
notified when this container's layout is refreshed.
"""
super().__init__(content=content, on_refresh=on_refresh)
super().__init__(content=content, parent=parent)
self.native = UIView.alloc().init()
self.native.translatesAutoresizingMaskIntoConstraints = True

Expand All @@ -88,7 +88,7 @@ def __init__(
self,
content=None,
layout_native=None,
on_refresh=None,
parent=None,
):
"""
:param content: The widget impl that is the container's initial content.
Expand All @@ -97,13 +97,13 @@ def __init__(
itself; however, for widgets like ScrollContainer where the layout
needs to be computed based on a different size to what will be
rendered, the source of the size can be different.
:param on_refresh: The callback to be notified when this container's layout is
refreshed.
:param parent: The parent of this container; this is the object that will be
notified when this container's layout is refreshed.
"""
super().__init__(
content=content,
layout_native=layout_native,
on_refresh=on_refresh,
parent=parent,
)

# Construct a NavigationController that provides a navigation bar, and
Expand Down

0 comments on commit 3c21869

Please sign in to comment.