2013-05-27 5 views
1

이 코드를 사용하여 내 Monotouch.Dialog의 상단에 표시되는 이미지, 로고,이에 UIView의 스트레칭 Monotouch.Dialog :

 var logo = new UIImageView(logonLogoPNG) 
      { 
       AutoresizingMask = UIViewAutoresizing.FlexibleTopMargin | 
            UIViewAutoresizing.FlexibleLeftMargin | 
            UIViewAutoresizing.FlexibleBottomMargin | 
            UIViewAutoresizing.FlexibleRightMargin, 
      }; 
     var secLogo = new Section(logo); 

문제는 그 형식은 아이 패드에 표시 할 때 로고가 늘어납니다. 자동 크기 조절 마스크는 도움이되지 않는 것으로 보입니다.

스트레치를 어떻게 멈 춥니 까?

 //Add a centered Logo in the top Section of the Monotouch.dialog 
     var logo = new UIImageView(image) 
         { AutoresizingMask = UIViewAutoresizing.FlexibleMargins}; 
     var logoView = new UIView(new RectangleF(0, 0, UIScreen.MainScreen.Bounds.Width,logo.Frame.Height)); 
     logo.Center = logoView.Center; 
     logoView.AddSubview(logo); 

트릭은 다음 유연한 여백 로고 흐름을 포함하는보기 중앙에 로고의 중심을 설정했다 :

답변

0

여기 내 솔루션입니다.