Skip to content

Commit

Permalink
Showing 2 changed files with 19 additions and 11 deletions.
7 changes: 6 additions & 1 deletion TLPhotoPicker/Classes/TLPhotosPickerViewController.swift
Original file line number Diff line number Diff line change
@@ -71,7 +71,8 @@ open class TLPhotosPickerViewController: UIViewController {
@IBOutlet open var customNavItem: UINavigationItem!
@IBOutlet open var doneButton: UIBarButtonItem!
@IBOutlet open var cancelButton: UIBarButtonItem!

@IBOutlet open var navigationBarTopConstraint: NSLayoutConstraint!

public weak var delegate: TLPhotosPickerViewControllerDelegate? = nil
public var selectedAssets = [TLPHAsset]()
public var configure = TLPhotosPickerConfigure()
@@ -168,6 +169,10 @@ open class TLPhotosPickerViewController: UIViewController {
if self.thumbnailSize == CGSize.zero {
initItemSize()
}
if #available(iOS 11.0, *) {
} else if self.navigationBarTopConstraint.constant == 0 {
self.navigationBarTopConstraint.constant = 20
}
}

override open func viewWillAppear(_ animated: Bool) {
23 changes: 13 additions & 10 deletions TLPhotoPicker/Classes/TLPhotosPickerViewController.xib
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12120" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13174"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -17,6 +18,7 @@
<outlet property="customNavItem" destination="5CU-MZ-p1K" id="ih7-d3-nco"/>
<outlet property="doneButton" destination="daA-Ag-vVv" id="P53-fy-Sbh"/>
<outlet property="indicator" destination="AEv-G6-dRI" id="coA-3n-07e"/>
<outlet property="navigationBarTopConstraint" destination="IKp-hS-tTy" id="MFH-eP-0tb"/>
<outlet property="popArrowImageView" destination="5zn-je-qLx" id="6k9-cH-vcU"/>
<outlet property="subTitleArrowImageView" destination="b7w-7R-rco" id="IjY-7S-Zz1"/>
<outlet property="subTitleLabel" destination="DON-iU-Cox" id="ZyB-O9-EcR"/>
@@ -42,29 +44,29 @@
</connections>
</barButtonItem>
<view key="titleView" contentMode="scaleToFill" id="VAz-Py-dsa">
<rect key="frame" x="112.5" y="5.5" width="150" height="33"/>
<rect key="frame" x="87.5" y="2" width="200" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="Ql8-7f-9Uk">
<rect key="frame" x="0.0" y="0.0" width="150" height="33"/>
<rect key="frame" x="0.0" y="0.0" width="200" height="40"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xuG-bc-Oq9">
<rect key="frame" x="54.5" y="0.0" width="41.5" height="19.5"/>
<rect key="frame" x="79.5" y="0.0" width="41.5" height="19.5"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="kgt-Cn-AXg">
<rect key="frame" x="53" y="19.5" width="44.5" height="13.5"/>
<rect key="frame" x="78" y="19.5" width="44.5" height="20.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="DON-iU-Cox">
<rect key="frame" x="0.0" y="0.0" width="29.5" height="13.5"/>
<rect key="frame" x="0.0" y="3.5" width="29.5" height="13.5"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="11"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="b7w-7R-rco">
<rect key="frame" x="34.5" y="2" width="10" height="10"/>
<rect key="frame" x="34.5" y="5.5" width="10" height="10"/>
<constraints>
<constraint firstAttribute="width" priority="999" constant="10" id="7bM-Da-Q8A"/>
<constraint firstAttribute="height" priority="999" constant="10" id="OHz-gp-CQp"/>
@@ -165,17 +167,18 @@
<constraint firstItem="AEv-G6-dRI" firstAttribute="centerX" secondItem="Zyk-dI-msE" secondAttribute="centerX" id="44C-fd-MVc"/>
<constraint firstItem="X8O-Gg-slz" firstAttribute="leading" secondItem="Zyk-dI-msE" secondAttribute="leading" id="4Ud-fp-qD2"/>
<constraint firstItem="4gR-Bn-quP" firstAttribute="top" secondItem="X8O-Gg-slz" secondAttribute="bottom" id="CZx-xl-GLa"/>
<constraint firstItem="X8O-Gg-slz" firstAttribute="top" secondItem="Zyk-dI-msE" secondAttribute="top" constant="20" id="JQf-ju-E7j"/>
<constraint firstItem="X8O-Gg-slz" firstAttribute="top" secondItem="HLR-WT-D3I" secondAttribute="top" id="IKp-hS-tTy"/>
<constraint firstItem="Jcn-hC-Umh" firstAttribute="top" secondItem="X8O-Gg-slz" secondAttribute="bottom" id="KdD-nT-6tf"/>
<constraint firstAttribute="trailing" secondItem="4gR-Bn-quP" secondAttribute="trailing" id="M6b-2G-2m1"/>
<constraint firstAttribute="trailing" secondItem="Jcn-hC-Umh" secondAttribute="trailing" id="Njh-ZO-lnq"/>
<constraint firstAttribute="bottom" secondItem="Jcn-hC-Umh" secondAttribute="bottom" id="NxH-d8-b65"/>
<constraint firstAttribute="bottom" secondItem="4gR-Bn-quP" secondAttribute="bottom" id="Sqf-Yv-c5x"/>
<constraint firstItem="AEv-G6-dRI" firstAttribute="centerY" secondItem="Zyk-dI-msE" secondAttribute="centerY" id="aLU-u9-ALA"/>
<constraint firstItem="Jcn-hC-Umh" firstAttribute="leading" secondItem="Zyk-dI-msE" secondAttribute="leading" id="aY7-Ml-cd3"/>
<constraint firstItem="4gR-Bn-quP" firstAttribute="leading" secondItem="Zyk-dI-msE" secondAttribute="leading" id="kb7-vy-yTu"/>
<constraint firstItem="4gR-Bn-quP" firstAttribute="bottom" secondItem="HLR-WT-D3I" secondAttribute="bottom" id="qqE-w2-Tsc"/>
<constraint firstAttribute="trailing" secondItem="X8O-Gg-slz" secondAttribute="trailing" id="yWV-L2-0f4"/>
</constraints>
<viewLayoutGuide key="safeArea" id="HLR-WT-D3I"/>
<point key="canvasLocation" x="33.5" y="53.5"/>
</view>
</objects>

0 comments on commit 53f171a

Please sign in to comment.