• Windows下Xamarin.iOS xib无法调整大小问题


    Windows下Xamarin.iOS xib无法调整大小问题

    开发环境windows10,Visual Studio 2017

    Simulated Metrics Size 选择Freeform,按道理此时xib中View应该可以自定义大小,但是实际上是不行的。

    使用代码编辑器打开xib文件,查看源码中有这样一行代码:<size key="freeformSize" width="414" height="736"/>,删除其中的width和height即可。

     1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
     2 <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     3     <dependencies>
     4         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
     5         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     6     </dependencies>
     7     <objects>
     8         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
     9         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
    10         <view contentMode="scaleToFill" id="1">
    11             <rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
    12             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
    13             <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
    14             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
    15             <size key="freeformSize" width="414" height="736"/>
    16         </view>
    17     </objects>
    18     <resources>
    19         <image name="ITunesArtwork" width="512" height="512"/>
    20         <image name="ITunesArtwork@2x" width="512" height="512"/>
    21         <image name="photo.png" width="96" height="96"/>
    22     </resources>
    23 </document>
  • 相关阅读:
    web中缓存的使用
    .net1.1 Read Byte Array From File
    数据库连接的多种方式(二)
    存储过程和SQL语句比较及存储过程在C#中调用方法(转)
    exec与sp_executesql语法的区别详解(转)
    SQL Server存储过程入门案例详解
    asp.net结合aspnetpager用sql语句分页
    数据库连接的多种方式(一)
    分页存储过程1
    asp.net结合aspnetpager使用SQL2005的存储过程分页(转)
  • 原文地址:https://www.cnblogs.com/devin_zhou/p/8038434.html
Copyright © 2020-2023  润新知