2011-10-21 3 views
2

나는 MonoTouch에 다소 익숙하며 MonoTouch Dialog API에 주목하여 매우 유용합니다. 내가 달성하고자이 같은 것입니다 : MonoTouch 대화 상자 사용자 정의 글꼴

enter image description here http://img641.imageshack.us/img641/8514/consumentstartscherm.png

그래서 나는 테이블 뷰 셀에 일반 텍스트를 원하는 ...하지만 내가 어떻게 이것을 달성 할 수 있습니까? 현재 캡션 섹션에 텍스트를 배치하고 있지만 굵은 글꼴로되어 있습니다. 이 같은

답변

3

무언가가 당신에게 가까이됩니다

 var label = new UILabel(); 
     var frame = label.Frame; 
     frame.Inflate (0, 32); 
     label.Frame = frame; 
     label.Font = UIFont.BoldSystemFontOfSize (32); 
     label.Text = "Ad4You"; 
     label.TextAlignment = UITextAlignment.Center; 
     label.BackgroundColor = UIColor.FromWhiteAlpha (0f, 0f); 

     Section s = new Section ("Ad4You"); 
     s.HeaderView = label; 

     s.Add (new StyledMultilineElement (String.Empty, 
      "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", 
      UITableViewCellStyle.Subtitle)); 

     var root = new RootElement ("Home"); 
     root.Add (s); 

     var dv = new DialogViewController (root, true) { Autorotate = true }; 
     NavigationController.PushViewController (dv, true);    

:-) MonoTouch 및 MonoTouch.Dialog 재미 있나요
관련 문제