                 Layout.setEqualBottom(view: view, subview: topSubview, margins: true)
             }
         }
-        
-        (itemsAlertList as! ACStackAlertListView).stat()
-    }
-    
-    override func viewWillLayoutSubviews() {
-        super.viewWillLayoutSubviews()
-        (itemsAlertList as! ACStackAlertListView).stat()
     }
     
     var hasItems: Bool { return items.count > 0 }
     var hasActions: Bool { return actions.count > 0 }
+    var maxViewHeight: CGFloat { return UIScreen.main.bounds.height - 80 }
     
     func elementsHeights() -> (itemsHeight: CGFloat?, actionsHeight: CGFloat?) {
-        let max = maxViewHeight() - viewMargins.topPlusBottom
+        let max = maxViewHeight - viewMargins.topPlusBottom
         
         switch (itemsAlertList?.contentHeight, actionsAlertList?.contentHeight) {
         case (nil, nil):

        Layout.setEqual(view:scrollView, subview: stackView, margins: false)
        Layout.set(width: width, view: stackView)
        
        contentHeight = stackView.systemLayoutSizeFitting(UILayoutFittingCompressedSize).height
    }

    func stat() {
        scrollView.layoutSubviews()
        print("LOG", scrollView.contentSize, stackView.frame.size, stackView.systemLayoutSizeFitting(UILayoutFittingCompressedSize))
    }
}


            return (max2 / 2, max2 / 2)
        }
    }
}

class Layout {
