File tree Expand file tree Collapse file tree
src/Core/src/Handlers/Border Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,10 +54,26 @@ static partial void UpdateContent(IBorderHandler handler)
5454 var platformContent = content . ToPlatform ( handler . MauiContext ) ;
5555
5656 // If the content is a UIScrollView, we need a container to handle masks and clip shapes effectively.
57- if ( platformContent is UIScrollView && content . Handler is not null )
57+ if ( platformContent is UIScrollView )
5858 {
59- content . Handler . HasContainer = true ;
60- UpdateContent ( handler ) ;
59+ var containerView = new UIView
60+ {
61+ BackgroundColor = UIColor . Clear ,
62+ ClipsToBounds = true ,
63+ TranslatesAutoresizingMaskIntoConstraints = false
64+ } ;
65+
66+ platformContent . Tag = ContentView . ContentTag ;
67+ containerView . AddSubview ( platformContent ) ;
68+ platformView . AddSubview ( containerView ) ;
69+
70+ NSLayoutConstraint . ActivateConstraints (
71+ [
72+ containerView . TopAnchor . ConstraintEqualTo ( platformView . TopAnchor ) ,
73+ containerView . LeadingAnchor . ConstraintEqualTo ( platformView . LeadingAnchor ) ,
74+ containerView . TrailingAnchor . ConstraintEqualTo ( platformView . TrailingAnchor ) ,
75+ containerView . BottomAnchor . ConstraintEqualTo ( platformView . BottomAnchor )
76+ ] ) ;
6177 }
6278 else
6379 {
You can’t perform that action at this time.
0 commit comments