2017-06-15 5 views
1

私はUIProgressViewを持っていますが、コーナー半径を設定して変換したいが、コーナー半径が正しく動作しないようにしたい。変換を設定してもコーナー半径を設定していない場合IOS

Xamarin.iosでの私のコード:

UIProgressView progressView = new UIProgressView(newFrame) 
      {    
       //Set background track color = gray 
       TrackTintColor = CustomColors.CustomColors.GetColor(CustomColors.CustomColors.ColorGray), 

       //Set progress track color = blue 
       ProgressTintColor = CustomColors.CustomColors.GetColor(CustomColors.CustomColors.ColorBlue) 
      }; 

      //Set Y scale 
      progressView.Transform = CGAffineTransform.Scale(progressView.Transform, 1, 20f); 

      progressView.Layer.CornerRadius = 15f; 

      progressView.Layer.MasksToBounds = true; 

      progressView.ClipsToBounds = true; 

progressView:CornerRadiusはCGAffineTransform後に適切に動作しませんので、残念ながら

enter image description here

答えて

1

、私はそれを修正する方法を見つけることができませんでした。規模。

もう1つのトリックは、カスタムTrackImageとProgressImageを設定し、次にCGAffineTransform.Scaleを作成することです。

0

これは、アイデンティティではないトランスフォームのようです。 position/boundsとcornerRadiusでアニメーションを実装しようとします。

+0

コメント、低品質です。 – Billa

+0

私は同じ問題を抱え、上記の方法で解決しました。 – numbbuaa

関連する問題