Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Example/ContainerControllerSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@
TargetAttributes = {
607FACCF1AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
DevelopmentTeam = Y7546NLJW9;
DevelopmentTeam = YKFJWH4C9S;
LastSwiftMigration = 0900;
};
};
Expand Down Expand Up @@ -1303,7 +1303,7 @@
baseConfigurationReference = 0AA8BF39B9F182FE833C0178 /* Pods-ContainerControllerSwift_Example.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = Y7546NLJW9;
DEVELOPMENT_TEAM = YKFJWH4C9S;
INFOPLIST_FILE = ContainerControllerSwift/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MODULE_NAME = ExampleApp;
Expand All @@ -1319,7 +1319,7 @@
baseConfigurationReference = 84550121AB9630F101ECE515 /* Pods-ContainerControllerSwift_Example.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = Y7546NLJW9;
DEVELOPMENT_TEAM = YKFJWH4C9S;
INFOPLIST_FILE = ContainerControllerSwift/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MODULE_NAME = ExampleApp;
Expand Down
43 changes: 28 additions & 15 deletions Example/ContainerControllerSwift/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="aV9-EX-QWJ">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="cIu-62-xtU">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="ContainerControllerSwift_Example" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="ContainerController" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="623"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="603"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="UYm-tY-WGa" customClass="TableAdapterView" customModule="ContainerControllerSwift">
<rect key="frame" x="0.0" y="0.0" width="375" height="623"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="603"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</tableView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="bottom" secondItem="UYm-tY-WGa" secondAttribute="bottom" id="Usw-ep-vba"/>
<constraint firstItem="UYm-tY-WGa" firstAttribute="top" secondItem="6Tk-OE-BBY" secondAttribute="top" id="qmS-hQ-rSa"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="UYm-tY-WGa" secondAttribute="trailing" id="vQK-T0-eQf"/>
<constraint firstItem="UYm-tY-WGa" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" id="wXp-OO-MUn"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
<navigationItem key="navigationItem" id="x48-lm-dG7"/>
<connections>
Expand All @@ -39,20 +41,31 @@
<point key="canvasLocation" x="132" y="137.18140929535232"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="2WA-6t-2aK">
<scene sceneID="jWl-Kd-Y9J">
<objects>
<navigationController id="aV9-EX-QWJ" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" translucent="NO" id="QWK-gZ-mYK">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<navigationController id="cIu-62-xtU" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" translucent="NO" id="y83-TR-htY">
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="barTintColor" systemColor="secondaryLabelColor"/>
<navigationBarAppearance key="compactAppearance"/>
</navigationBar>
<connections>
<segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="SPa-ED-zkK"/>
<segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="Lpq-ZC-BiY"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Uhq-S7-WHN" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="bJL-5a-VyA" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-631" y="137"/>
<point key="canvasLocation" x="-855" y="137"/>
</scene>
</scenes>
<resources>
<systemColor name="secondaryLabelColor">
<color red="0.23529411764705882" green="0.23529411764705882" blue="0.2627450980392157" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -14,13 +16,44 @@
<view key="view" contentMode="scaleToFill" id="jmi-Lo-St4">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gqJ-oN-JCK">
<rect key="frame" x="110.5" y="50" width="154" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="MXC-rS-qfY"/>
</constraints>
<fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="18"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="isTranslucent true">
<color key="titleColor" systemColor="systemBlueColor"/>
</state>
<connections>
<action selector="btnChangeTranslucentAction:" destination="p3c-kf-PfN" eventType="touchUpInside" id="hjO-rR-Ij1"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="QCP-uk-H24"/>
<color key="backgroundColor" systemColor="opaqueSeparatorColor"/>
<constraints>
<constraint firstItem="gqJ-oN-JCK" firstAttribute="top" secondItem="QCP-uk-H24" secondAttribute="top" constant="30" id="2Vg-iw-6Rl"/>
<constraint firstItem="gqJ-oN-JCK" firstAttribute="centerX" secondItem="jmi-Lo-St4" secondAttribute="centerX" id="Crs-BD-puY"/>
</constraints>
</view>
<connections>
<outlet property="btnChangeTranslucent" destination="gqJ-oN-JCK" id="34t-Kh-blv"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Uzt-sR-4xA" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="781.15942028985512" y="43.526785714285715"/>
</scene>
</scenes>
<resources>
<systemColor name="opaqueSeparatorColor">
<color red="0.77647058823529413" green="0.77647058823529413" blue="0.78431372549019607" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemBlueColor">
<color red="0.0" green="0.47843137254901963" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ class ExampleAddCollectionViewController: StoryboardController {

var container: ContainerController!

@IBOutlet var btnChangeTranslucent: UIButton!
// MARK: - Init

override func viewDidLoad() {
super.viewDidLoad()

title = "Example Add CollectionView"

btnUpdateText()

let layoutC = ContainerLayout()
layoutC.positions = ContainerPosition(top: 100, middle: 250, bottom: 70)
Expand All @@ -33,6 +37,24 @@ class ExampleAddCollectionViewController: StoryboardController {
container.move(type: .middle)
}

@IBAction func btnChangeTranslucentAction(_ sender: UIButton) {

guard let translucent = navigationController?.navigationBar.isTranslucent else { return }

navigationController?.navigationBar.isTranslucent = !translucent

btnUpdateText()

container.move(type: container.moveType)
}

func btnUpdateText() {

guard let translucent = navigationController?.navigationBar.isTranslucent else { return }

btnChangeTranslucent.setTitle("NavBar isTranslucent \(translucent)", for: .normal)
}

func addCollectionView() -> UICollectionView {

let layout = UICollectionViewFlowLayout()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -14,13 +16,18 @@
<view key="view" contentMode="scaleToFill" id="jmi-Lo-St4">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<viewLayoutGuide key="safeArea" id="QCP-uk-H24"/>
<color key="backgroundColor" systemColor="opaqueSeparatorColor"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Uzt-sR-4xA" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="781.15942028985512" y="43.526785714285715"/>
</scene>
</scenes>
<resources>
<systemColor name="opaqueSeparatorColor">
<color red="0.77647058820000003" green="0.77647058820000003" blue="0.7843137255" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class ExampleAddTableViewController: StoryboardController {
override func viewDidLoad() {
super.viewDidLoad()

title = "Example Add TableView"

let layout = ContainerLayout()
layout.backgroundShadowShow = true
layout.positions = ContainerPosition(top: 70, middle: 250, bottom: 100)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ class ExamplesContainerController: ContainerController, ExampleCellDelegate {
ExampleSwitchCellItem(height: h, delegate: self, type: .shadowBackground, value: false),
ExampleSliderCellItem(height: h, delegate: self, type: .shadowContainer, value: 0.2, maximumValue: 1.0),
ExampleSliderCellItem(height: h, delegate: self, type: .cornerRadius, value: 15, maximumValue: 140),

ExampleSwitchCellItem(height: h, delegate: self, type: .navbarTranslucent, value: false),

ExampleSwitchCellItem(height: h, delegate: self, type: .movingEnabled, value: true),
ExampleSwitchCellItem(height: h, delegate: self, type: .trackingPosition, value: false),
ExampleSliderCellItem(height: h, delegate: self, type: .footerPadding, value: 0, maximumValue: Float(ContainerDevice.screenMax)),
Expand Down Expand Up @@ -122,6 +125,8 @@ class ExamplesContainerController: ContainerController, ExampleCellDelegate {

case .shadowContainer: self.view.addShadow(opacity: value)

case .navbarTranslucent: self.controller?.navigationController?.navigationBar.isTranslucent = boolValue; move(type: moveType)

case .movingEnabled: set(movingEnabled: boolValue)

case .trackingPosition: set(trackingPosition: boolValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class ExamplesSettingsViewController: StoryboardController {
override func viewDidLoad() {
super.viewDidLoad()

title = "Example Add/Settings Container"

let barButtonAddItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(navigationBarAddAction))
let barButtonCloseItem = UIBarButtonItem(barButtonSystemItem: .close, target: self, action: #selector(navigationBarCloseAction))
self.navigationItem.rightBarButtonItems = [ barButtonAddItem, barButtonCloseItem ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ extension ExampleCell {
public enum Style: String {
case `default` = ""
case shadowContainer = "ShadowContainer"
case navbarTranslucent = "NavbarTranslucent"
case movingEnabled = "MovingEnabled"
case cornerRadius = "CornerRadius"
case footerPadding = "FooterView.Padding"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,16 @@ class MapViewManager: NSObject {
// MARK: - Location Manager

func loadLocation() {

if CLLocationManager.locationServicesEnabled() {
locationManager = CLLocationManager()
locationManager?.delegate = self
locationManager?.desiredAccuracy = kCLLocationAccuracyBest
locationManager?.requestAlwaysAuthorization()
locationManager?.startUpdatingLocation()
DispatchQueue.global().async {
if CLLocationManager.locationServicesEnabled() {
DispatchQueue.main.async {
self.locationManager = CLLocationManager()
self.locationManager?.delegate = self
self.locationManager?.desiredAccuracy = kCLLocationAccuracyBest
self.locationManager?.requestAlwaysAuthorization()
self.locationManager?.startUpdatingLocation()
}
}
}
}

Expand Down
Loading