lss
2020-06-12 9c16d3614d9b88c637f967518a329f239fcd3aaf
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs
@@ -31,7 +31,7 @@
            get
            {
                int count = base.ChildrenCount;
                if (frameBackTemp != null)
                if (frameBackTemp != null && frameBackTemp.Parent != null)
                {
                    count--;
                }
@@ -49,7 +49,14 @@
        /// <param name="i_rowSpace">行之间的间距(这个值是与行控件绑定一起使用的)</param>
        public VerticalListControl(int i_rowSpace = 0)
        {
            rowSpace = Application.GetRealHeight(i_rowSpace);
            this.rowSpace = Application.GetRealHeight(i_rowSpace);
#if iOS
            //自动偏移取消
            if (UIKit.UIDevice.CurrentDevice.CheckSystemVersion(11, 0))
            {
                (this.uiView as UIKit.UIScrollView).ContentInsetAdjustmentBehavior = UIKit.UIScrollViewContentInsetAdjustmentBehavior.Never;
            }
#endif
        }
        #endregion
@@ -87,6 +94,9 @@
            if (this.maxHeight != -1)
            {
                this.Height = this.maxHeight;
#if iOS
                this.ReLocation();
#endif
            }
        }
@@ -97,16 +107,14 @@
        /// <param name="addSpace">当真实高度超过原有高度时,是否添加空白</param>
        public void AdjustRealHeight(int bottomSpace, bool addSpace = true)
        {
            int count = frameBackTemp == null ? this.ChildrenCount : this.ChildrenCount - 1;
            //总之,先重置至最大
            this.RecoverHeight();
            int count = this.ChildrenCount;
            if (count <= 0)
            {
                frameBackTemp?.RemoveFromParent();
                frameBackTemp = null;
                if (maxHeight != -1)
                {
                    //还原为最大高度
                    this.Height = maxHeight;
                }
                return;
            }
@@ -118,6 +126,9 @@
                frameBackTemp = null;
                //缩小控件高度
                this.Height = realHeight;
#if iOS
                this.ReLocation();
#endif
            }
            else if (addSpace == true && bottomSpace > 0 && realHeight > this.maxHeight)
            {
@@ -144,6 +155,9 @@
                {
                    //还原为最大高度
                    this.Height = maxHeight;
#if iOS
                    this.ReLocation();
#endif
                }
                return;
            }