当前位置: 首页>>代码示例>>C#>>正文


C# CALayer.InsertSublayer方法代码示例

本文整理汇总了C#中CALayer.InsertSublayer方法的典型用法代码示例。如果您正苦于以下问题:C# CALayer.InsertSublayer方法的具体用法?C# CALayer.InsertSublayer怎么用?C# CALayer.InsertSublayer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CALayer的用法示例。


在下文中一共展示了CALayer.InsertSublayer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BrightlyBlurredUIView

        public BrightlyBlurredUIView()
        {
            toolbar = new UIToolbar {
                Opaque = true,
            };
            this.Layer.AddSublayer(blurLayer = toolbar.Layer);

            accentView = new UIView {
                BackgroundColor = this.TintColor,
                Alpha = .7f,
                Opaque = false
            };

            blurLayer.InsertSublayer(accentLayer = accentView.Layer,1);
            this.Layer.MasksToBounds = true;
            this.BackgroundColor = UIColor.Clear;
        }
开发者ID:WCSandbox,项目名称:xamarin-store-app,代码行数:17,代码来源:BrightlyBlurredUIView.cs

示例2: StoreCellLayer

        public static CALayer StoreCellLayer(RectangleF frame)
        {
            CALayer layer = new CALayer();
            layer.Frame = frame;

            CALayer backgroundLayer = new CALayer();
            backgroundLayer.Frame = new RectangleF(0, 0, frame.Width, frame.Height);
            backgroundLayer.BackgroundColor = UIColor.FromRGBA(19, 19, 19, 255).CGColor;
            layer.InsertSublayer(backgroundLayer, 0);

            CALayer topLayer1 = new CALayer();
            topLayer1.Frame = new RectangleF(0, 0, frame.Width, 1);
            topLayer1.BackgroundColor = UIColor.FromRGBA(25, 27, 28, 255).CGColor;
            layer.InsertSublayerAbove(topLayer1, backgroundLayer);

            CALayer topLayer2 = new CALayer();
            topLayer2.Frame = new RectangleF(0, 1, frame.Width, 1);
            topLayer2.BackgroundColor = UIColor.FromRGBA(10, 10, 10, 255).CGColor;
            layer.InsertSublayerAbove(topLayer2, backgroundLayer);

            CALayer bottomLayer1 = new CALayer();
            bottomLayer1.Frame = new RectangleF(0, frame.Height - 2, frame.Width, 1);
            bottomLayer1.BackgroundColor = UIColor.FromRGBA(23, 25, 26, 255).CGColor;
            layer.InsertSublayerAbove(bottomLayer1, backgroundLayer);

            CALayer bottomLayer2 = new CALayer();
            bottomLayer2.Frame = new RectangleF(0, frame.Height - 1, frame.Width, 1);
            bottomLayer2.BackgroundColor = UIColor.FromRGBA(42, 43, 44, 255).CGColor;
            layer.InsertSublayerAbove(bottomLayer2, backgroundLayer);

            return layer;
        }
开发者ID:GrimmRanger,项目名称:FGUtils,代码行数:32,代码来源:LayerHelper.cs


注:本文中的CALayer.InsertSublayer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。