iOS_ScrollView的自己主动布局

时间:2023-01-12 20:53:26

ScrollView的自己主动布局稍显麻烦。但也是有规律可循,

下面就是仅竖向滑动的scrollView加入约束的固定做法

1.在控制器的view加入一个label。取名做anchor

2.给anchor加入约束:距上右下左全是0 (表示anchor与控制器的view等大)

3.加入一个scrollView

4.给scrollView相同加入约束:距上右下左全是0(表示scrollView也与控制器的view等大)

到此,scrollView还差两个关键约束(此2个约束决定水平和竖直方向的滚动范围)

5.在scrollView中加入一个label。取名叫bg1(通过该label就能够直接确定scrollView的滚动范围)

6.给bg1加入约束,bg1 距上右左 全为0;高度固定为35

下面就是关键点来了:

同一时候选中anchor和bg1,让它们等宽equal width;

(注:目的是让scrollView的水平滚动范围刚好与屏幕宽同样,即水平方向不可滚动)

bg1距下999

(注:目的是确定scrollView的竖向滚动范围,此值能够随意调整,此约束也能够加在随意一个scrollView中的最下方的一个子元素身上)

===========新增重要更新===================

怎样让xib生成的scrollView:即便内容非常少非常短,也能在不同的屏幕上滚动

比如:scrollView里面最下方的是一个btn。

则在xib时,btn距离下方scrollView为:推荐值+1个像素,

推荐值计算式例如以下:

scrollView的高度-getMaxY(btn.frame)

而且:(最重要的是)将该约束constraint连线成为:iboutlet,

最后在控制器viewDidLoad中,

依据不同的屏幕高度重置该约束constraint的constant值为:

推荐值+1个像素。就可以解决!!!

=====================10 13更新Start==========================

原则就是:contentSize中的height要比scrollView的高度大1个点





演示样例:

scrollview上面有一个button,距离顶10,左10。中间是一个非常大的空白;底部是一个bottomLabel;底部bottomLabel距离下方scrollview10

先连上要用到的控件:

scrollView、topBtn、bottomLabel、还有dynamicVConstraint(底标签距topBtn的动态距离,随手机高度动态变化)





開始上代码:

- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated]; // 默认xib中 随便设置67
CGFloat vconstant = (self.scrooView.height - CGRectGetMaxY(self.xib_rightBtn.frame) - self.xib_bottomLabel.height -10)+1;
DLog(@"vconstant__%f",vconstant);
// 有可能出现负数,取MAX(vconstant,1或oldValue)
self.dynamicVConstraint.constant = vconstant; [self.view setNeedsLayout];
[self.view layoutIfNeeded]; }

=====================10 13更新End==========================

- (void)diy_scrollView
{
// scrollView的高度-getMaxY(btn.frame)+1
// 注:value也有可能是负数,如:(当scrollView的contentSize大于其height时)
CGFloat value = _scrollView.height - CGRectGetMaxY(_xib_lastLabel.frame) + 1;
// xib上的最底部的view距离 scrollView的一般为1
CGFloat oldConstant = _constraint_lastLabel_V_bottom.constant; _constraint_lastLabel_V_bottom.constant = MAX(value, oldConstant);
[self.view layoutIfNeeded];
}

===========以下是:xib界面=================

如有不明确的地方能够在下方提出

iOS_ScrollView的自己主动布局

==========================新增顶部固定宽高比的imgView===============================================

目的:保持顶部大图 2:1的宽高比

先aspect fill+clip subviews,并手动设置图片为宽320,高160

再開始加入约束:距离左上右0,并勾选aspect ratio就可以

iOS_ScrollView的自己主动布局

======================以下是BeyondCtrl.xib模板代码================

该模板在使用时。仅需更改 customClass="BeyondCtrl"为目标控制器名称就可以使用

<?

xml version="1.0" encoding="UTF-8" standalone="no"?

>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="BeyondCtrl">
<connections>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="320" height="1000"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qgo-zY-zlk" userLabel="anchor">
<rect key="frame" x="0.0" y="0.0" width="320" height="1000"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="trS-aa-5Y1" userLabel="scrollView">
<rect key="frame" x="0.0" y="0.0" width="320" height="1000"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="klg-gx-6SQ" userLabel="bg_1">
<rect key="frame" x="0.0" y="0.0" width="320" height="10"/>
<color key="backgroundColor" red="1" green="0.78895520959999998" blue="0.14824080179999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="10" id="957-kf-gZC"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="klg-gx-6SQ" firstAttribute="leading" secondItem="trS-aa-5Y1" secondAttribute="leading" id="4ib-Ge-5re"/>
<constraint firstAttribute="bottom" secondItem="klg-gx-6SQ" secondAttribute="bottom" constant="990" id="K63-zG-xhs"/>
<constraint firstAttribute="trailing" secondItem="klg-gx-6SQ" secondAttribute="trailing" id="VXs-dc-6sE"/>
<constraint firstItem="klg-gx-6SQ" firstAttribute="top" secondItem="trS-aa-5Y1" secondAttribute="top" id="nXy-dY-Pjo"/>
</constraints>
</scrollView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="qgo-zY-zlk" secondAttribute="trailing" id="7g9-JP-7u3"/>
<constraint firstAttribute="trailing" secondItem="trS-aa-5Y1" secondAttribute="trailing" id="7mq-nm-RX2"/>
<constraint firstItem="trS-aa-5Y1" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="DQT-lq-HsE"/>
<constraint firstItem="qgo-zY-zlk" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="Egw-Tf-Zad"/>
<constraint firstAttribute="bottom" secondItem="qgo-zY-zlk" secondAttribute="bottom" id="FZN-U0-yPY"/>
<constraint firstAttribute="bottom" secondItem="trS-aa-5Y1" secondAttribute="bottom" id="U1y-5T-guj"/>
<constraint firstItem="qgo-zY-zlk" firstAttribute="width" secondItem="klg-gx-6SQ" secondAttribute="width" id="ey8-H5-mSu"/>
<constraint firstItem="trS-aa-5Y1" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="ndZ-fs-HcT"/>
<constraint firstItem="qgo-zY-zlk" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="u6f-bB-I4B"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
</view>
</objects>
</document>

模板一:纯自己主动布局的带弹簧效果

iOS_ScrollView的自己主动布局

//
// BeyondCtrl.h
// KnowingLife
//
// Created by beyond on 15/8/7.
// Copyright (c) 2015年 beyond.com All rights reserved.
// 专用于:自己主动布局的scrollView的弹簧效果
// 重点是:lastView(其y是自己主动计算的),其下方一段动态的VMargin(距离scrollView底部) #import <UIKit/UIKit.h> @interface BeyondCtrl : UIViewController // 要设置contentSize的height 等于 其height + 1
@property (weak, nonatomic) IBOutlet UIScrollView *scrollView; // 贴底的button上方是一个UIView
@property (weak, nonatomic) IBOutlet UIView *lastView; // 一段动态的VMargin 距离 底部scrollView
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *dynamicVConstraint; @end
//
// BeyondCtrl.m
// KnowingLife
//
// Created by beyond on 15/8/7.
// Copyright (c) 2015年 beyond.com All rights reserved.
// #import "BeyondCtrl.h"
#import "UIView+Frame.h"
@interface BeyondCtrl () @end @implementation BeyondCtrl
#pragma mark - 动态调整 button上方的这段空白距离
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated]; // 要设置contentSize的height 等于 其height + 1
CGFloat vconstant = self.scrollView.height - CGRectGetMaxY(self.lastView.frame) +1;
// 结果有可能为负数,取MAX(vconstant,1)
DLog(@"vconstant__%f",vconstant);
self.dynamicVConstraint.constant = vconstant; [self.view setNeedsLayout];
[self.view layoutIfNeeded]; }
- (void)viewDidLoad {
[super viewDidLoad]; } @end
<?xml version="1.0" encoding="UTF-8" standalone="no"?

>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="BeyondCtrl">
<connections>
<outlet property="dynamicVConstraint" destination="rla-bt-Q6i" id="7aV-mT-s98"/>
<outlet property="lastView" destination="DCQ-uR-7cN" id="RK2-pg-hhA"/>
<outlet property="scrollView" destination="trS-aa-5Y1" id="qpi-pB-wne"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="320" height="1000"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qgo-zY-zlk" userLabel="anchor">
<rect key="frame" x="0.0" y="0.0" width="320" height="1000"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="trS-aa-5Y1" userLabel="scrollView">
<rect key="frame" x="0.0" y="0.0" width="320" height="1000"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="klg-gx-6SQ" userLabel="bg_1">
<rect key="frame" x="0.0" y="0.0" width="320" height="20"/>
<color key="backgroundColor" red="1" green="0.78895520959999998" blue="0.14824080179999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="957-kf-gZC"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="《我们仍未知道那天所看见的花的名字》" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sa0-AD-kQm" userLabel="title">
<rect key="frame" x="10" y="30" width="300" height="53"/>
<fontDescription key="fontDescription" type="system" pointSize="22"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DCQ-uR-7cN" userLabel="aboveBottomBtn">
<rect key="frame" x="10" y="93" width="300" height="163"/>
<string key="text"> 在我们走过的季节里。路旁盛开的花朵也在不断变化,那个季节盛开的花是叫什么来着?轻轻摇曳着,一碰会微微刺痛,靠近一闻,隐约有股青涩的阳光的气息。那气息渐渐地淡去,我们也在慢慢长大。 但是。那朵花一定还在某个地方盛开着……对,我们永远都会继续实现那朵花的愿望。</string>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="klg-gx-6SQ" firstAttribute="leading" secondItem="trS-aa-5Y1" secondAttribute="leading" id="4ib-Ge-5re"/>
<constraint firstAttribute="trailing" secondItem="sa0-AD-kQm" secondAttribute="trailing" constant="10" id="5hV-GO-DHI"/>
<constraint firstItem="DCQ-uR-7cN" firstAttribute="leading" secondItem="trS-aa-5Y1" secondAttribute="leading" constant="10" id="MzR-eI-wQH"/>
<constraint firstAttribute="trailing" secondItem="DCQ-uR-7cN" secondAttribute="trailing" constant="10" id="OlQ-hF-YOE"/>
<constraint firstItem="sa0-AD-kQm" firstAttribute="leading" secondItem="trS-aa-5Y1" secondAttribute="leading" constant="10" id="Ov5-hC-0YJ"/>
<constraint firstAttribute="trailing" secondItem="klg-gx-6SQ" secondAttribute="trailing" id="VXs-dc-6sE"/>
<constraint firstItem="klg-gx-6SQ" firstAttribute="top" secondItem="trS-aa-5Y1" secondAttribute="top" id="nXy-dY-Pjo"/>
<constraint firstAttribute="bottom" secondItem="DCQ-uR-7cN" secondAttribute="bottom" constant="744" id="rla-bt-Q6i"/>
<constraint firstItem="DCQ-uR-7cN" firstAttribute="top" secondItem="sa0-AD-kQm" secondAttribute="bottom" constant="10" id="wJe-px-BJF"/>
<constraint firstItem="sa0-AD-kQm" firstAttribute="top" secondItem="klg-gx-6SQ" secondAttribute="bottom" constant="10" id="xgH-xa-og8"/>
</constraints>
</scrollView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="qgo-zY-zlk" secondAttribute="trailing" id="7g9-JP-7u3"/>
<constraint firstAttribute="trailing" secondItem="trS-aa-5Y1" secondAttribute="trailing" id="7mq-nm-RX2"/>
<constraint firstItem="trS-aa-5Y1" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="DQT-lq-HsE"/>
<constraint firstItem="qgo-zY-zlk" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="Egw-Tf-Zad"/>
<constraint firstAttribute="bottom" secondItem="qgo-zY-zlk" secondAttribute="bottom" id="FZN-U0-yPY"/>
<constraint firstAttribute="bottom" secondItem="trS-aa-5Y1" secondAttribute="bottom" id="U1y-5T-guj"/>
<constraint firstItem="qgo-zY-zlk" firstAttribute="width" secondItem="klg-gx-6SQ" secondAttribute="width" id="ey8-H5-mSu"/>
<constraint firstItem="trS-aa-5Y1" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="ndZ-fs-HcT"/>
<constraint firstItem="qgo-zY-zlk" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="u6f-bB-I4B"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
</view>
</objects>
</document>

模板二:底部固定一个button,带弹簧效果

iOS_ScrollView的自己主动布局

//
// BeyondCtrl.h
// KnowingLife
//
// Created by beyond on 15/8/7.
// Copyright (c) 2015年 beyond.com All rights reserved.
// 专用于:不满一个屏幕内容的。弹簧效果
// 重点是:一个贴底的button,其上方一段动态的VMargin,其上方是一个UIView(是自己主动计算的) #import <UIKit/UIKit.h> @interface BeyondCtrlBottom : UIViewController // 要设置contentSize的height 等于 其height + 1
@property (weak, nonatomic) IBOutlet UIScrollView *scrollView; // 贴底的button上方是一个UIView
@property (weak, nonatomic) IBOutlet UIView *aboveBottomBtn; // 贴底的button上方的 一段动态的VMargin
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *dynamicVConstraint; // 一个贴底的button
@property (weak, nonatomic) IBOutlet UIButton *bottomBtn; @end
//
// BeyondCtrl.m
// KnowingLife
//
// Created by beyond on 15/8/7.
// Copyright (c) 2015年 beyond.com All rights reserved.
// #import "BeyondCtrlBottom.h"
#import "UIView+Frame.h"
@interface BeyondCtrlBottom () @end @implementation BeyondCtrlBottom
#pragma mark - 动态调整 button上方的这段空白距离
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated]; // 10 是由于贴底的button 跟scrollView底部相距10
CGFloat vconstant = (self.scrollView.height - CGRectGetMaxY(self.aboveBottomBtn.frame) - self.bottomBtn.height -10)+1;
// 结果有可能为负数,取MAX(vconstaint,1)
DLog(@"vconstant__%f",vconstant);
self.dynamicVConstraint.constant = vconstant; [self.view setNeedsLayout];
[self.view layoutIfNeeded]; }
- (void)viewDidLoad {
[super viewDidLoad]; } @end

<?xml version="1.0" encoding="UTF-8" standalone="no"?

>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="BeyondCtrlBottom">
<connections>
<outlet property="aboveBottomBtn" destination="DCQ-uR-7cN" id="OlC-WV-3ic"/>
<outlet property="bottomBtn" destination="8Yn-es-0DL" id="k9h-KC-M8K"/>
<outlet property="dynamicVConstraint" destination="Bqm-NR-8A8" id="WT2-V9-AFX"/>
<outlet property="scrollView" destination="trS-aa-5Y1" id="qpi-pB-wne"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="320" height="1000"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qgo-zY-zlk" userLabel="anchor">
<rect key="frame" x="0.0" y="0.0" width="320" height="1000"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="trS-aa-5Y1" userLabel="scrollView">
<rect key="frame" x="0.0" y="0.0" width="320" height="1000"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="klg-gx-6SQ" userLabel="bg_1">
<rect key="frame" x="0.0" y="0.0" width="320" height="20"/>
<color key="backgroundColor" red="1" green="0.78895520959999998" blue="0.14824080179999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="957-kf-gZC"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="《我们仍未知道那天所看见的花的名字》" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sa0-AD-kQm" userLabel="title">
<rect key="frame" x="10" y="30" width="300" height="53"/>
<fontDescription key="fontDescription" type="system" pointSize="22"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DCQ-uR-7cN" userLabel="aboveBottomBtn">
<rect key="frame" x="10" y="93" width="300" height="163"/>
<string key="text"> 在我们走过的季节里。路旁盛开的花朵也在不断变化,那个季节盛开的花是叫什么来着?轻轻摇曳着。一碰会微微刺痛。靠近一闻,隐约有股青涩的阳光的气息。那气息渐渐地淡去,我们也在慢慢长大。但是,那朵花一定还在某个地方盛开着……对。我们永远都会继续实现那朵花的愿望。 </string>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8Yn-es-0DL" userLabel="bottomBtn">
<rect key="frame" x="10" y="936" width="300" height="44"/>
<color key="backgroundColor" red="0.12549019610000001" green="0.41176470590000003" blue="0.89019607840000003" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="gwI-DX-zdv"/>
</constraints>
<state key="normal" title="贴底按钮">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="8Yn-es-0DL" secondAttribute="trailing" constant="10" id="2Sj-DP-5zS"/>
<constraint firstItem="klg-gx-6SQ" firstAttribute="leading" secondItem="trS-aa-5Y1" secondAttribute="leading" id="4ib-Ge-5re"/>
<constraint firstAttribute="trailing" secondItem="sa0-AD-kQm" secondAttribute="trailing" constant="10" id="5hV-GO-DHI"/>
<constraint firstItem="8Yn-es-0DL" firstAttribute="top" secondItem="DCQ-uR-7cN" secondAttribute="bottom" constant="680" id="Bqm-NR-8A8"/>
<constraint firstItem="DCQ-uR-7cN" firstAttribute="leading" secondItem="trS-aa-5Y1" secondAttribute="leading" constant="10" id="MzR-eI-wQH"/>
<constraint firstAttribute="trailing" secondItem="DCQ-uR-7cN" secondAttribute="trailing" constant="10" id="OlQ-hF-YOE"/>
<constraint firstItem="sa0-AD-kQm" firstAttribute="leading" secondItem="trS-aa-5Y1" secondAttribute="leading" constant="10" id="Ov5-hC-0YJ"/>
<constraint firstItem="8Yn-es-0DL" firstAttribute="leading" secondItem="trS-aa-5Y1" secondAttribute="leading" constant="10" id="SOi-xe-8cK"/>
<constraint firstAttribute="trailing" secondItem="klg-gx-6SQ" secondAttribute="trailing" id="VXs-dc-6sE"/>
<constraint firstAttribute="bottom" secondItem="8Yn-es-0DL" secondAttribute="bottom" constant="10" id="dHI-dN-yVt"/>
<constraint firstItem="klg-gx-6SQ" firstAttribute="top" secondItem="trS-aa-5Y1" secondAttribute="top" id="nXy-dY-Pjo"/>
<constraint firstItem="DCQ-uR-7cN" firstAttribute="top" secondItem="sa0-AD-kQm" secondAttribute="bottom" constant="10" id="wJe-px-BJF"/>
<constraint firstItem="sa0-AD-kQm" firstAttribute="top" secondItem="klg-gx-6SQ" secondAttribute="bottom" constant="10" id="xgH-xa-og8"/>
</constraints>
</scrollView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="qgo-zY-zlk" secondAttribute="trailing" id="7g9-JP-7u3"/>
<constraint firstAttribute="trailing" secondItem="trS-aa-5Y1" secondAttribute="trailing" id="7mq-nm-RX2"/>
<constraint firstItem="trS-aa-5Y1" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="DQT-lq-HsE"/>
<constraint firstItem="qgo-zY-zlk" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="Egw-Tf-Zad"/>
<constraint firstAttribute="bottom" secondItem="qgo-zY-zlk" secondAttribute="bottom" id="FZN-U0-yPY"/>
<constraint firstAttribute="bottom" secondItem="trS-aa-5Y1" secondAttribute="bottom" id="U1y-5T-guj"/>
<constraint firstItem="qgo-zY-zlk" firstAttribute="width" secondItem="klg-gx-6SQ" secondAttribute="width" id="ey8-H5-mSu"/>
<constraint firstItem="trS-aa-5Y1" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="ndZ-fs-HcT"/>
<constraint firstItem="qgo-zY-zlk" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="u6f-bB-I4B"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
</view>
</objects>
</document>