0

enter image description hereStruct:

  • ASScrollNode(Stack vertical layout)
    • ASCollectionNode(without layoutSpecThatFits)
    • ASButtonNode, ASButtonNode (absolute position)

I want the buttons to be displayed on ASCollectionNode (and not moved when scrolling the collection). How could I do that?

I tried to use ASOverlayLayoutSpec and new wrap node, but no one displaying.

  • if you want static views in ScrollView(like ASCollectionNode or similar) you must get delegate method and calculate offsetContent and calculate it for our view, but its better use UICollectionViewFlowLayout with specific layout logic. But my skill tells to me so you want something more simple. And I recommend for you share design what are you want. – Bimawa Jul 29 '18 at 04:12
  • added photo (white button like a segmentedControl is ASButtonNode with absolute position) – Aleksandr Maybach Aug 01 '18 at 05:29
  • it looks like stick header https://stackoverflow.com/a/39096454/887325. Just create View for stickHeader and insert layouts button in it. – Bimawa Aug 01 '18 at 07:49
  • no. This block just first in stack. And scrolling like other content – Aleksandr Maybach Aug 01 '18 at 08:43
  • hmm maybe you need to add ASButtonNode on the same layer with ASCollectionNode? Superview |- CollectionNode |- SegmentButtons and scrollview will not scroll ur buttons because it not on scrollView layer. – Bimawa Aug 01 '18 at 09:18

0 Answers0