TabHeader clipping table cells when zooming in

We have SfTabView with each tab hosting UITableView as child contents. We allow zooming in of UIImageView hosted inside of UIScrollView inside table cell. When user zooms in, image is properly zoomed, but the header of SfTabView clips the image, though we set 'Layer.ZPosition = 1000' of cell and image being zoomed, and though we set SfTabView's .ClipsToBounds = false.

What could be the cause?

Code:

 void HandleZPositionInRecursions(UIView v)
        {
            if (v != null)
            {
                v.ClipsToBounds = false;
                v.Layer.ZPosition = 1;

                foreach (var child in v.Subviews)
                {
                    if (child != null)
                    {
                        child.ClipsToBounds = false;
                        child.Layer.ZPosition = 1;

                        HandleZPositionInRecursions(child);
                    }
                }
            }
        }

We explicitly set zooming image and scroll view to be at the top on zoom action:

     imageScrollView.ViewForZoomingInScrollView += (UIScrollView sv) =>
            {
                UITableView tab = null;
                this.Table.TryGetTarget(out tab);
                tab.ScrollEnabled = false;

                var parentView = sv.Superview;
                while (parentView != null)
                {
                    parentView = parentView.Superview;

                    if (parentView is SfTabView sfTabView)
                    {
                        HandleZPositionInRecursions(parentView);
                    }
                }

                this.Layer.ZPosition = 1000;
                imageView.Layer.ZPosition = 1000;
                sv.Layer.ZPosition = 1000;
                this.Superview.Layer.ZPosition = 100;

                tab.ClipsToBounds = false;

                tab.SeparatorStyle = UITableViewCellSeparatorStyle.None;

                imageScrollView.ContentSize = new CGSize(imageView.Frame.Width, imageView.Frame.Height);
                return imageView;
            };


3 Replies 1 reply marked as answer

RS Ramya Soundar Rajan Syncfusion Team June 25, 2020 01:51 PM UTC

Hi Johnny, 
 
Greetings from Syncfusion. 
 
We have prepared a simple sample from the code snippet provided and we have recorded the video for your reference.  
 
 
 
Could you please check the video and sample and confirm us whether the reported issue is same as in video and If the issue mentioned different from this please modify the above sample or provide the video representing the issue for us to investigate further to provide the solution at the earliest. 
 
Regards, 
Ramya S 



JB Johnny Boy June 25, 2020 01:55 PM UTC

Hi,

yes, this is exactly the problem which we have.

How can we resolve it?

Br,
D.


RS Ramya Soundar Rajan Syncfusion Team June 26, 2020 01:28 PM UTC

Hi Johnny, 

We have modified code snippet as like below to resolve the reported issue.


 
Code Snippet: 
void HandleZPositionInRecursions(UIView v) 
        { 
            if (v != null && !(v is SfTabView)) 
            { 
                v.ClipsToBounds = false; 
                v.Layer.ZPosition = 1; 
 
                foreach (var child in v.Subviews) 
                { 
                    if (child != null) 
                    { 
                        child.ClipsToBounds = false; 
                        child.Layer.ZPosition = 1; 
 
                        HandleZPositionInRecursions(child); 
                    } 
                } 
            } 
        } 
 
Please find the modified sample from below link 
 
  
Please check with the above and let us know if you have any concern. 
 
Regards, 
Ramya S 


Marked as answer
Loader.
Up arrow icon