2017-02-02 7 views
0

このコードを実行しようとしました。XamarinでストーリーボードのUIViewにアルファを設定する方法

public override void ViewDidLoad() 
    { 
     base.ViewDidLoad(); 

     backGroundView.BackgroundColor = UIColor.LightGray.ColorWithAlpha(0.3f);} 

ただし、動作しない可能性があります。実際、それは表示されたときに成功のように見えます。

enter image description here

ちょうど秒後に背景色が暗く変化しました。

enter image description here

と同じに関して私を示唆しています。

+0

私はVisual Studio for Mac Preview 3を使用しています。 –

答えて

0

この問題を解決できます。

私はこれをviewcontrollerメソッドで記述する必要があります。

public override UIModalPresentationStyle ModalPresentationStyle 
    { 

     get 
     { 
      return UIModalPresentationStyle.OverCurrentContext; 
     } 
     set 
     { 
      base.ModalPresentationStyle = value; 
     } 
    } 

Visual Studio for Macプレビュー3のストーリーボードでは、Segueプロパティで全画面表示を選択できません。それが私が混乱した理由です。

関連する問題