2014-07-20 30 views
0

使用最初在Xcode 4中开发的故事板在Xcode 5中工作,并且此工具栏的属性不会修改。如果我尝试取消选中“半透明”属性,它将保持选中状态。如果我将样式更改为默认值,它将恢复为黑色。如果我选择另一种色调,它会自行恢复为默认。无法在界面构建器中编辑工具栏的属性

interface builder

我已经花了几个小时寻找其他人报告这个问题,但还没有找到一个解决方案。如此处所示,propertyAccessControl="none"一路通过xml作为故事板,所以不应该被锁定。

<?xml version="1.0" encoding="UTF-8" standalone="no"?> 
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5056" systemVersion="12F45" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="jL0-BO-w2j"> 
     <dependencies> 
      <deployment version="1296" defaultVersion="1296" identifier="iOS"/> 
      <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/> 
     </dependencies> 
     <scenes> 
      <!--Navigation Controller--> 
     <scene sceneID="gu0-4A-nEl"> 
      <objects> 
       <navigationController toolbarHidden="NO" id="jL0-BO-w2j" sceneMemberID="viewController"> 
        <simulatedNavigationBarMetrics key="simulatedTopBarMetrics" barStyle="black" prompted="NO"/> 
        <simulatedToolbarMetrics key="simulatedBottomBarMetrics" barStyle="black"/> 
        <navigationBar key="navigationBar" contentMode="scaleToFill" translucent="NO" id="dbG-E3-2vd"> 
         <rect key="frame" x="0.0" y="-44" width="0.0" height="44"/> 
         <autoresizingMask key="autoresizingMask"/> 
        </navigationBar> 
        <toolbar key="toolbar" opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" barStyle="black" id="tYf-Nn-i3a"> 
         <rect key="frame" x="0.0" y="436" width="320" height="44"/> 
         <autoresizingMask key="autoresizingMask"/> 
        </toolbar> 
        <connections> 
         <segue destination="a8f-Pc-RWZ" kind="relationship" relationship="rootViewController" id="iWb-Pc-dmA"/> 
        </connections> 
       </navigationController> 
       <placeholder placeholderIdentifier="IBFirstResponder" id="bVC-2G-0Rf" userLabel="First Responder" sceneMemberID="firstResponder"/> 
      </objects> 
      <point key="canvasLocation" x="-542" y="196"/> 
     </scene> 
     <!--Launcher Vw Ctrlr--> 
     <scene sceneID="jIZ-Jl-nXT"> 
      <objects> 
       <viewController id="a8f-Pc-RWZ" customClass="CMLauncherVwCtrlr" sceneMemberID="viewController"> 
        <view key="view" contentMode="scaleToFill" id="7fP-rW-Kc8"> 
         <rect key="frame" x="0.0" y="64" width="320" height="416"/> 
         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> 
         <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> 
        </view> 
        <extendedEdge key="edgesForExtendedLayout" bottom="YES"/> 
        <toolbarItems> 
         <barButtonItem title="Prev" id="GnE-88-jui"> 
          <connections> 
           <action selector="prev:" destination="a8f-Pc-RWZ" id="DGd-03-xGA"/> 
          </connections> 
         </barButtonItem> 
        </toolbarItems> 
        <navigationItem key="navigationItem" id="xrV-QS-Ox8"/> 
        <simulatedNavigationBarMetrics key="simulatedTopBarMetrics" barStyle="black" prompted="NO"/> 
        <simulatedToolbarMetrics key="simulatedBottomBarMetrics" barStyle="black"/> 
        <connections> 
         <outlet property="prevButton" destination="GnE-88-jui" id="uP0-CN-ALW"/> 
        </connections> 
       </viewController> 
       <placeholder placeholderIdentifier="IBFirstResponder" id="5ng-sW-JW4" userLabel="First Responder" sceneMemberID="firstResponder"/> 
      </objects> 
      <point key="canvasLocation" x="-61" y="196"/> 
     </scene> 
    </scenes> 
    <simulatedMetricsContainer key="defaultSimulatedMetrics"> 
     <simulatedStatusBarMetrics key="statusBar"/> 
     <simulatedOrientationMetrics key="orientation"/> 
     <simulatedScreenMetrics key="destination"/> 
    </simulatedMetricsContainer> 
</document> 

我发现我可以以编程方式设置属性,但想知道为什么我不能使用Interface Builder来完成它。

任何人看到此行为?有没有修复?

回答

1

我发现问题是:这是我。我不明白一些物体与其他物体的关系。在原始文章中的图像中,您可以看到工具栏已嵌入到导航控制器中。

toolbar attributes

如果我检查封闭的导航控制器的性能,我可以看到工具栏的样式和半透明的性质实际上是在“底栏”控制那里。

navigation controller attributes

我只需要知道Interface Builder的更好,我猜。

相关问题