Exemplo n.º 1
0
        public AllTagView(float height, float frameX, float frameY) : base(new CGRect(frameX, frameY, height * 2, height))
        {
            float outerRadius = height / 2;
            float innerRadius = outerRadius - 1;

            DoubleCircleView greenCircle  = new DoubleCircleView(innerRadius, outerRadius, UIColor.Green, UIColor.White, 0, 0);
            DoubleCircleView yellowCircle = new DoubleCircleView(innerRadius, outerRadius, ColorUtil.ConvertFromHexColorCode("#EEC900"), UIColor.White, outerRadius, 0);
            DoubleCircleView redCircle    = new DoubleCircleView(innerRadius, outerRadius, UIColor.Red, UIColor.White, 2 * outerRadius, 0);

            AddSubview(redCircle);
            AddSubview(yellowCircle);
            AddSubview(greenCircle);
        }
Exemplo n.º 2
0
        public TagFilterView(float radius, float frameX, float frameY) : base(new CGRect(frameX, frameY, radius * 2, radius * 2))
        {
            Layer.CornerRadius = radius;
            BackgroundColor    = UIColor.Red;

            float outerRadius = 6;
            float innerRadius = outerRadius - 1;

            DoubleCircleView first  = new DoubleCircleView(innerRadius, outerRadius, UIColor.White, UIColor.Red, (float)(outerRadius / 2), radius - outerRadius);
            DoubleCircleView second = new DoubleCircleView(innerRadius, outerRadius, UIColor.White, UIColor.Red, (float)(outerRadius * 1.5), radius - outerRadius);
            DoubleCircleView third  = new DoubleCircleView(innerRadius, outerRadius, UIColor.White, UIColor.Red, (float)(2.5 * outerRadius), radius - outerRadius);

            AddSubview(third);
            AddSubview(second);
            AddSubview(first);
        }