Xamarin - Gradient background

后端 未结 2 1696
长发绾君心
长发绾君心 2021-01-19 06:40

I\'m trying to programmatically set a background gradient like this in Xamarin iOS:

CGColor[] colors = new CGColor[] { new UIColor(red: 0.05f, green:0.44f, b         


        
2条回答
  •  情深已故
    2021-01-19 07:31

    I know I am late for the show but for future reference, I use:

    this.View.Layer.InsertSublayer(gradientLayer, 0);
    

    The 0 represents index.

提交回复
热议问题