2016-08-02 3 views
0

내 스토리 보드의보기 컨트롤러에 테이블보기가 내장되어 있습니다. Table View에는 3 개의 Table View 셀이 있습니다. 각 셀에는 텍스트 "A", "B"및 "C"가 있습니다. 문자는 Visual Studio에서 내 화면에 표시되지만 시뮬레이터에서 앱을 실행하면 아무 것도 볼 수 없습니다. 테이블/셀을 사용할 수 있는지 두 번 확인했습니다. 아래 Storeboard XML.VS 테이블보기 용 Xamarin 레이블 텍스트를 표시하지 않는 셀

<?xml version="1.0" encoding="UTF-8" standalone="no"?> 
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r"> 
    <dependencies> 
     <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/> 
    </dependencies> 
    <scenes> 
     <!--View Controller--> 
     <scene sceneID="tne-QT-ifu"> 
      <objects> 
       <viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController"> 
        <layoutGuides> 
         <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/> 
         <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> 
        </layoutGuides> 
        <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> 
         <rect key="frame" x="0.0" y="0.0" width="600" height="600"/> 
         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> 
         <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> 
         <subviews> 
          <containerView contentMode="scaleToFill" id="5" translatesAutoresizingMaskIntoConstraints="NO" fixedFrame="YES"> 
           <rect key="frame" x="116" y="126" width="320" height="300"/> 
           <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> 
           <connections> 
            <segue id="66" destination="13" kind="embed"/> 
           </connections> 
          </containerView> 
         </subviews> 
        </view> 
       </viewController> 
       <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> 
      </objects> 
      <point key="canvasLocation" x="0.0" y="0.0"/> 
     </scene> 
     <scene sceneID="12"> 
      <objects> 
       <tableViewController id="13" sceneMemberID="viewController"> 
        <tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="14"> 
         <rect key="frame" x="0.0" y="0.0" width="320" height="300"/> 
         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> 
         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 
         <prototypes> 
          <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="17" rowHeight="44"> 
           <rect key="frame" x="0.0" y="22" width="320" height="44"/> 
           <autoresizingMask key="autoresizingMask"/> 
           <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="17" id="18"> 
            <rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/> 
            <autoresizingMask key="autoresizingMask"/> 
           </tableViewCellContentView> 
          </tableViewCell> 
          <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="72" rowHeight="44" indentationLevel="0" style="IBUITableViewCellStyleDefault" textLabel="76"> 
           <rect key="frame" x="0.0" y="66" width="320" height="44"/> 
           <autoresizingMask key="autoresizingMask"/> 
           <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="72" id="73"> 
            <rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/> 
            <autoresizingMask key="autoresizingMask"/> 
            <subviews> 
             <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="A" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="76"> 
              <rect key="frame" x="16" y="0.0" width="288" height="43.5"/> 
              <autoresizingMask key="autoresizingMask"/> 
              <fontDescription key="fontDescription" type="system" pointSize="18"/> 
              <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> 
              <nil key="highlightedColor"/> 
             </label> 
            </subviews> 
           </tableViewCellContentView> 
          </tableViewCell> 
          <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="77" rowHeight="44" style="IBUITableViewCellStyleDefault" textLabel="81"> 
           <rect key="frame" x="0.0" y="110" width="320" height="44"/> 
           <autoresizingMask key="autoresizingMask"/> 
           <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="77" id="78"> 
            <rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/> 
            <autoresizingMask key="autoresizingMask"/> 
            <subviews> 
             <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="B" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="81"> 
              <rect key="frame" x="16" y="0.0" width="288" height="43.5"/> 
              <autoresizingMask key="autoresizingMask"/> 
              <fontDescription key="fontDescription" type="system" pointSize="18"/> 
              <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> 
              <nil key="highlightedColor"/> 
             </label> 
            </subviews> 
           </tableViewCellContentView> 
          </tableViewCell> 
          <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="79" rowHeight="44" style="IBUITableViewCellStyleDefault" textLabel="82"> 
           <rect key="frame" x="0.0" y="154" width="320" height="44"/> 
           <autoresizingMask key="autoresizingMask"/> 
           <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="79" id="80"> 
            <rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/> 
            <autoresizingMask key="autoresizingMask"/> 
            <subviews> 
             <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="82" text="C"> 
              <rect key="frame" x="16" y="0.0" width="288" height="43.5"/> 
              <autoresizingMask key="autoresizingMask"/> 
              <fontDescription key="fontDescription" type="system" pointSize="18"/> 
              <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> 
              <nil key="highlightedColor"/> 
             </label> 
            </subviews> 
           </tableViewCellContentView> 
          </tableViewCell> 
         </prototypes> 
         <connections> 
          <outlet property="dataSource" destination="13" id="15"/> 
          <outlet property="delegate" destination="13" id="16"/> 
         </connections> 
        </tableView> 
       </tableViewController> 
       <placeholder placeholderIdentifier="IBFirstResponder" id="19" userLabel="First Responder" sceneMemberID="firstResponder"/> 
      </objects> 
      <point key="canvasLocation" x="646" y="-5"/> 
     </scene> 
    </scenes> 
</document> 
+0

[있는 UITableViewController 외부 정적 테이블 뷰]의 가능한 복제 (http://stackoverflow.com/questions/22364230/static-table-view-outside-uitableviewcontroller) –

답변

0

답변은 아래 링크에서 찾을 수 있습니다. 이 링크의 토론은 Xcode를위한 것이지만 솔루션은 동일합니다. 테이블 뷰 컨트롤러를 만듭니다. View Controller에 컨테이너보기를 추가하고 Table View Controller를 그 안에 포함합니다. 표보기 내용을 "정적 셀"로 변경 한 다음 섹션을 추가하십시오. 거기에서 한 걸음 씩 취해야 할 간단한 테이블을 편집 할 수 있지만 어떻게 든 5가 걸렸습니다!

Xamarin은 정적이 아닌 셀 내용 테이블에 속한 셀에 너무 많은 텍스트를 추가하는 기능을 제거해야합니다. 혼란 스러울뿐입니다.

Static table view outside UITableViewController