Search code examples
ioscalayeraddsubview

ios make subview appear on top of CALayer


    [[background layer] addSublayer:myLayer];
    [background addSubview:toolbar];

I have a UIImageView called background. On top of this I have a subview called toolbar. Also, I have a CALayer on top of my background. The problem is, that I need toolbar to be on top of myLayer. How to make subview appear on top of layer?


Solution

  • the wrong way to do this is the zPosition property set to -1