update split class
This commit is contained in:
1 parent
9449d4d9d6
commit
87b208dc1b
10 files changed
+380
-302
No files matched your search
@@ -7,8 +7,6 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
46ACF0532490F52600FAAD43 /* ExamplesAddTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46ACEFD42490F52500FAAD43 /* ExamplesAddTableViewController.swift */; };
|
||||
46ACF0542490F52600FAAD43 /* ExamplesAddTableViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 46ACEFD52490F52500FAAD43 /* ExamplesAddTableViewController.storyboard */; };
|
||||
46ACF0552490F52600FAAD43 /* Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46ACEFD82490F52500FAAD43 /* Color.swift */; };
|
||||
46ACF0562490F52600FAAD43 /* UIView+Positioning.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46ACEFD92490F52500FAAD43 /* UIView+Positioning.swift */; };
|
||||
46ACF0572490F52600FAAD43 /* StoryboardController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46ACEFDC2490F52500FAAD43 /* StoryboardController.swift */; };
|
||||
@@ -103,6 +101,11 @@
|
||||
46ACF0D62490FEB300FAAD43 /* ExamplesScrollViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46ACF0C02490FEB300FAAD43 /* ExamplesScrollViews.swift */; };
|
||||
46ACF0D72490FEB300FAAD43 /* ExamplesSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46ACF0C12490FEB300FAAD43 /* ExamplesSettingsViewController.swift */; };
|
||||
46ACF0D92491A75300FAAD43 /* screenLandscape5.png in Resources */ = {isa = PBXBuildFile; fileRef = 46ACF0D82491A75300FAAD43 /* screenLandscape5.png */; };
|
||||
46ACF0E3249255ED00FAAD43 /* ExampleAddCollectionViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 46ACF0E1249255ED00FAAD43 /* ExampleAddCollectionViewController.storyboard */; };
|
||||
46ACF0E4249255ED00FAAD43 /* ExampleAddCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46ACF0E2249255ED00FAAD43 /* ExampleAddCollectionViewController.swift */; };
|
||||
46ACF0E824925B9200FAAD43 /* ExampleAddTableViewControllerSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46ACF0E524925B9200FAAD43 /* ExampleAddTableViewControllerSettings.swift */; };
|
||||
46ACF0E924925B9200FAAD43 /* ExampleAddTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46ACF0E624925B9200FAAD43 /* ExampleAddTableViewController.swift */; };
|
||||
46ACF0EA24925B9200FAAD43 /* ExampleAddTableViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 46ACF0E724925B9200FAAD43 /* ExampleAddTableViewController.storyboard */; };
|
||||
607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; };
|
||||
607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; };
|
||||
607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; };
|
||||
@@ -116,8 +119,6 @@
|
||||
0AA8BF39B9F182FE833C0178 /* Pods-ContainerControllerSwift_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ContainerControllerSwift_Example.debug.xcconfig"; path = "Target Support Files/Pods-ContainerControllerSwift_Example/Pods-ContainerControllerSwift_Example.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
1034FE614CC8890CE063531F /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
|
||||
121FB933CAE3EC5A2A00F4B2 /* Pods_ContainerControllerSwift_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ContainerControllerSwift_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
46ACEFD42490F52500FAAD43 /* ExamplesAddTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExamplesAddTableViewController.swift; sourceTree = "<group>"; };
|
||||
46ACEFD52490F52500FAAD43 /* ExamplesAddTableViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = ExamplesAddTableViewController.storyboard; sourceTree = "<group>"; };
|
||||
46ACEFD82490F52500FAAD43 /* Color.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Color.swift; sourceTree = "<group>"; };
|
||||
46ACEFD92490F52500FAAD43 /* UIView+Positioning.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Positioning.swift"; sourceTree = "<group>"; };
|
||||
46ACEFDC2490F52500FAAD43 /* StoryboardController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoryboardController.swift; sourceTree = "<group>"; };
|
||||
@@ -214,7 +215,12 @@
|
||||
46ACF0C02490FEB300FAAD43 /* ExamplesScrollViews.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExamplesScrollViews.swift; sourceTree = "<group>"; };
|
||||
46ACF0C12490FEB300FAAD43 /* ExamplesSettingsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExamplesSettingsViewController.swift; sourceTree = "<group>"; };
|
||||
46ACF0D82491A75300FAAD43 /* screenLandscape5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = screenLandscape5.png; sourceTree = "<group>"; };
|
||||
607FACD01AFB9204008FA782 /* ContainerControllerSwift_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ContainerControllerSwift_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
46ACF0E1249255ED00FAAD43 /* ExampleAddCollectionViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = ExampleAddCollectionViewController.storyboard; sourceTree = "<group>"; };
|
||||
46ACF0E2249255ED00FAAD43 /* ExampleAddCollectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleAddCollectionViewController.swift; sourceTree = "<group>"; };
|
||||
46ACF0E524925B9200FAAD43 /* ExampleAddTableViewControllerSettings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleAddTableViewControllerSettings.swift; sourceTree = "<group>"; };
|
||||
46ACF0E624925B9200FAAD43 /* ExampleAddTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleAddTableViewController.swift; sourceTree = "<group>"; };
|
||||
46ACF0E724925B9200FAAD43 /* ExampleAddTableViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = ExampleAddTableViewController.storyboard; sourceTree = "<group>"; };
|
||||
607FACD01AFB9204008FA782 /* ContainerController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ContainerController.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
||||
@@ -254,8 +260,9 @@
|
||||
46ACEFD32490F52500FAAD43 /* ExamplesAddTableView */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
46ACEFD42490F52500FAAD43 /* ExamplesAddTableViewController.swift */,
|
||||
46ACEFD52490F52500FAAD43 /* ExamplesAddTableViewController.storyboard */,
|
||||
46ACF0E624925B9200FAAD43 /* ExampleAddTableViewController.swift */,
|
||||
46ACF0E524925B9200FAAD43 /* ExampleAddTableViewControllerSettings.swift */,
|
||||
46ACF0E724925B9200FAAD43 /* ExampleAddTableViewController.storyboard */,
|
||||
);
|
||||
path = ExamplesAddTableView;
|
||||
sourceTree = "<group>";
|
||||
@@ -844,6 +851,15 @@
|
||||
path = Container;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
46ACF0DA2492297100FAAD43 /* ExampleAddCollectionView */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
46ACF0E2249255ED00FAAD43 /* ExampleAddCollectionViewController.swift */,
|
||||
46ACF0E1249255ED00FAAD43 /* ExampleAddCollectionViewController.storyboard */,
|
||||
);
|
||||
path = ExampleAddCollectionView;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
607FACC71AFB9204008FA782 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -858,7 +874,7 @@
|
||||
607FACD11AFB9204008FA782 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
607FACD01AFB9204008FA782 /* ContainerControllerSwift_Example.app */,
|
||||
607FACD01AFB9204008FA782 /* ContainerController.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -868,9 +884,10 @@
|
||||
children = (
|
||||
46ACEFD62490F52500FAAD43 /* Framework */,
|
||||
46ACEFE22490F52500FAAD43 /* Localization */,
|
||||
46ACF09F2490FEB200FAAD43 /* ExamplesSettings */,
|
||||
46ACEFD32490F52500FAAD43 /* ExamplesAddTableView */,
|
||||
46ACEFEB2490F52500FAAD43 /* Maps */,
|
||||
46ACF09F2490FEB200FAAD43 /* ExamplesSettings */,
|
||||
46ACF0DA2492297100FAAD43 /* ExampleAddCollectionView */,
|
||||
46ACEFD32490F52500FAAD43 /* ExamplesAddTableView */,
|
||||
607FACD51AFB9204008FA782 /* AppDelegate.swift */,
|
||||
46ACF09D2490FE2700FAAD43 /* SceneDelegate.swift */,
|
||||
607FACD71AFB9204008FA782 /* ViewController.swift */,
|
||||
@@ -930,7 +947,7 @@
|
||||
);
|
||||
name = ContainerControllerSwift_Example;
|
||||
productName = ContainerControllerSwift;
|
||||
productReference = 607FACD01AFB9204008FA782 /* ContainerControllerSwift_Example.app */;
|
||||
productReference = 607FACD01AFB9204008FA782 /* ContainerController.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
@@ -994,17 +1011,18 @@
|
||||
607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */,
|
||||
46ACF0742490F52600FAAD43 /* LocationTextCell.xib in Resources */,
|
||||
46ACF07F2490F52600FAAD43 /* HeaderDetailsView.xib in Resources */,
|
||||
46ACF0E3249255ED00FAAD43 /* ExampleAddCollectionViewController.storyboard in Resources */,
|
||||
46ACF0812490F52600FAAD43 /* HeaderSearchBarView.xib in Resources */,
|
||||
607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */,
|
||||
46ACF0C32490FEB300FAAD43 /* ExampleCollectionCell.xib in Resources */,
|
||||
46ACF0D22490FEB300FAAD43 /* ExampleHeaderGripView.xib in Resources */,
|
||||
46ACF0722490F52600FAAD43 /* LocationButtonCell.xib in Resources */,
|
||||
46ACF0D32490FEB300FAAD43 /* ExamplesSettingsViewController.storyboard in Resources */,
|
||||
46ACF0542490F52600FAAD43 /* ExamplesAddTableViewController.storyboard in Resources */,
|
||||
46ACF06F2490F52600FAAD43 /* LocationAddressCell.xib in Resources */,
|
||||
46ACF0C72490FEB300FAAD43 /* ExampleSegmentCell.xib in Resources */,
|
||||
46ACF0CF2490FEB300FAAD43 /* ExampleFooterButtonView.xib in Resources */,
|
||||
46ACF0D92491A75300FAAD43 /* screenLandscape5.png in Resources */,
|
||||
46ACF0EA24925B9200FAAD43 /* ExampleAddTableViewController.storyboard in Resources */,
|
||||
46ACF0872490F52600FAAD43 /* MapsMenuHeader.xib in Resources */,
|
||||
46ACF07B2490F52600FAAD43 /* MapsMenuSegmentCell.xib in Resources */,
|
||||
46ACF0762490F52600FAAD43 /* MapsSearchCell.xib in Resources */,
|
||||
@@ -1068,6 +1086,7 @@
|
||||
files = (
|
||||
46ACF06D2490F52600FAAD43 /* LocationCoordinateCell.swift in Sources */,
|
||||
46ACF0D42490FEB300FAAD43 /* ExamplesContainerController.swift in Sources */,
|
||||
46ACF0E924925B9200FAAD43 /* ExampleAddTableViewController.swift in Sources */,
|
||||
46ACF06B2490F52600FAAD43 /* MapsRouteCell.swift in Sources */,
|
||||
46ACF0752490F52600FAAD43 /* LocationTextCell.swift in Sources */,
|
||||
46ACF09A2490F52600FAAD43 /* MapsViewController.swift in Sources */,
|
||||
@@ -1091,11 +1110,13 @@
|
||||
46ACF0D52490FEB300FAAD43 /* ExamplesContainerControllerScrollType.swift in Sources */,
|
||||
46ACF0CB2490FEB300FAAD43 /* TitleTextCell.swift in Sources */,
|
||||
46ACF08F2490F52600FAAD43 /* MapsMainContainerLayout.swift in Sources */,
|
||||
46ACF0E4249255ED00FAAD43 /* ExampleAddCollectionViewController.swift in Sources */,
|
||||
46ACF0772490F52600FAAD43 /* MapsSearchCell.swift in Sources */,
|
||||
46ACF05F2490F52600FAAD43 /* MapsFavoriteCell.swift in Sources */,
|
||||
46ACF0582490F52600FAAD43 /* XibView.swift in Sources */,
|
||||
46ACF0782490F52600FAAD43 /* MapsMenuSpaceCell.swift in Sources */,
|
||||
46ACF0972490F52600FAAD43 /* MenuContainerControllerDelegate.swift in Sources */,
|
||||
46ACF0E824925B9200FAAD43 /* ExampleAddTableViewControllerSettings.swift in Sources */,
|
||||
46ACF0552490F52600FAAD43 /* Color.swift in Sources */,
|
||||
46ACF0692490F52600FAAD43 /* MapsSectionCell.swift in Sources */,
|
||||
46ACF0882490F52600FAAD43 /* MapsButtons.swift in Sources */,
|
||||
@@ -1120,7 +1141,6 @@
|
||||
46ACF0982490F52600FAAD43 /* MenuContainerController.swift in Sources */,
|
||||
46ACF0672490F52600FAAD43 /* MapsLocationCell.swift in Sources */,
|
||||
46ACF0D62490FEB300FAAD43 /* ExamplesScrollViews.swift in Sources */,
|
||||
46ACF0532490F52600FAAD43 /* ExamplesAddTableViewController.swift in Sources */,
|
||||
46ACF07E2490F52600FAAD43 /* HeaderDetailsView.swift in Sources */,
|
||||
607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */,
|
||||
46ACF05A2490F52600FAAD43 /* DesignView.swift in Sources */,
|
||||
@@ -1287,8 +1307,8 @@
|
||||
INFOPLIST_FILE = ContainerControllerSwift/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MODULE_NAME = ExampleApp;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = mrusta.ContainerController;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = mrustaa.ContainerController;
|
||||
PRODUCT_NAME = ContainerController;
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
@@ -1303,8 +1323,8 @@
|
||||
INFOPLIST_FILE = ContainerControllerSwift/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MODULE_NAME = ExampleApp;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = mrusta.ContainerController;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = mrustaa.ContainerController;
|
||||
PRODUCT_NAME = ContainerController;
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
|
||||
+2
-2
@@ -7,10 +7,10 @@
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Examples Add Table View Controller-->
|
||||
<!--Example Add Collection View Controller-->
|
||||
<scene sceneID="0f9-5i-ygC">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="ExamplesAddTableViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="p3c-kf-PfN" customClass="ExamplesAddTableViewController" customModule="ContainerControllerSwift_Example" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<viewController storyboardIdentifier="ExampleAddCollectionViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="p3c-kf-PfN" customClass="ExampleAddCollectionViewController" customModule="ContainerController" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<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"/>
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
//
|
||||
// ExampleAddCollectionViewController.swift
|
||||
// ContainerControllerSwift
|
||||
//
|
||||
// Created by mrustaa on 09.06.2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import ContainerControllerSwift
|
||||
|
||||
class ExampleAddCollectionViewController: StoryboardController {
|
||||
|
||||
var container: ContainerController!
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
|
||||
let layoutC = ContainerLayout()
|
||||
layoutC.positions = ContainerPosition(top: 100, middle: 250, bottom: 70)
|
||||
container = ContainerController(addTo: self, layout: layoutC)
|
||||
container.view.cornerRadius = 15
|
||||
container.view.addShadow()
|
||||
container.add(scrollView: addCollectionView())
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
container.move(type: .middle)
|
||||
}
|
||||
|
||||
func addCollectionView() -> UICollectionView {
|
||||
|
||||
let layout = UICollectionViewFlowLayout()
|
||||
|
||||
let padding: CGFloat = 15
|
||||
layout.sectionInset = UIEdgeInsets(top: padding, left: padding, bottom: padding, right: padding)
|
||||
layout.minimumLineSpacing = padding
|
||||
layout.minimumInteritemSpacing = padding
|
||||
|
||||
let colletion = UICollectionView(frame: CGRect.zero, collectionViewLayout: layout)
|
||||
colletion.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "cell")
|
||||
colletion.backgroundColor = .clear
|
||||
colletion.delegate = self
|
||||
colletion.dataSource = self
|
||||
return colletion
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Scroll Delegate
|
||||
|
||||
extension ExampleAddCollectionViewController: UIScrollViewDelegate {
|
||||
|
||||
func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
||||
container.scrollViewDidScroll(scrollView)
|
||||
}
|
||||
|
||||
func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
|
||||
container.scrollViewWillBeginDragging(scrollView)
|
||||
}
|
||||
|
||||
func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
|
||||
container.scrollViewDidEndDecelerating(scrollView)
|
||||
}
|
||||
|
||||
func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
|
||||
container.scrollViewDidEndDragging(scrollView, willDecelerate: decelerate)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Collection DataSource
|
||||
|
||||
extension ExampleAddCollectionViewController: UICollectionViewDataSource {
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||
return 17
|
||||
}
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath)
|
||||
|
||||
let randomInt = Int.random(in: 0..<6)
|
||||
|
||||
var color: UIColor = .systemBlue
|
||||
|
||||
switch randomInt {
|
||||
case 0: color = .systemBlue
|
||||
case 1: color = .systemRed
|
||||
case 2: color = .systemGray
|
||||
case 3: color = .systemGreen
|
||||
case 4: color = .systemYellow
|
||||
case 5: color = .systemOrange
|
||||
default: break
|
||||
}
|
||||
|
||||
cell.backgroundColor = color
|
||||
cell.layer.cornerRadius = 12
|
||||
return cell
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Collection Layout
|
||||
|
||||
extension ExampleAddCollectionViewController: UICollectionViewDelegateFlowLayout {
|
||||
|
||||
public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
|
||||
let size = ((ContainerDevice.width / 2) - 1) - 22
|
||||
return CGSize(width: size, height: size)
|
||||
}
|
||||
}
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
<?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">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Example Add Table View Controller-->
|
||||
<scene sceneID="0f9-5i-ygC">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="ExampleAddTableViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="p3c-kf-PfN" customClass="ExampleAddTableViewController" customModule="ContainerController" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<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"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Uzt-sR-4xA" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="781.15942028985512" y="43.526785714285715"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
//
|
||||
// ExampleAddTableViewController.swift
|
||||
// ContainerControllerSwift
|
||||
//
|
||||
// Created by mrustaa on 09.06.2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import ContainerControllerSwift
|
||||
|
||||
class ExampleAddTableViewController: StoryboardController {
|
||||
|
||||
var container: ContainerController!
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
let layout = ContainerLayout()
|
||||
layout.backgroundShadowShow = true
|
||||
layout.positions = ContainerPosition(top: 70, middle: 250, bottom: 100)
|
||||
container = ContainerController(addTo: self, layout: layout)
|
||||
container.view.cornerRadius = 15
|
||||
container.view.addShadow()
|
||||
container.add(scrollView: addTableView())
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
container.move(type: .top)
|
||||
}
|
||||
|
||||
func addTableView() -> UITableView {
|
||||
|
||||
let tableView = UITableView()
|
||||
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "cell")
|
||||
tableView.delegate = self
|
||||
tableView.dataSource = self
|
||||
return tableView
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: - Scroll Delegate
|
||||
|
||||
extension ExampleAddTableViewController: UIScrollViewDelegate {
|
||||
|
||||
func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
||||
container.scrollViewDidScroll(scrollView)
|
||||
}
|
||||
|
||||
func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
|
||||
container.scrollViewWillBeginDragging(scrollView)
|
||||
}
|
||||
|
||||
func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
|
||||
container.scrollViewDidEndDecelerating(scrollView)
|
||||
}
|
||||
|
||||
func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
|
||||
container.scrollViewDidEndDragging(scrollView, willDecelerate: decelerate)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Table Delegate
|
||||
|
||||
extension ExampleAddTableViewController: UITableViewDelegate {
|
||||
|
||||
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
|
||||
return 60
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Table DataSource
|
||||
|
||||
extension ExampleAddTableViewController: UITableViewDataSource {
|
||||
|
||||
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
return 21
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
|
||||
cell.textLabel?.text = "item \(indexPath.row)"
|
||||
cell.backgroundColor = .clear
|
||||
return cell
|
||||
}
|
||||
}
|
||||
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
//
|
||||
// ExampleAddTableViewControllerSettings.swift
|
||||
// ContainerControllerSwift
|
||||
//
|
||||
// Created by mrustaa on 09.06.2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import ContainerControllerSwift
|
||||
|
||||
extension ExampleAddTableViewController {
|
||||
|
||||
// MARK: - Settings
|
||||
|
||||
func changeViewParametrs() {
|
||||
|
||||
container.view.cornerRadius = 15 // Change cornerRadius global
|
||||
container.view.addShadow(opacity: 0.1) // Add layer shadow
|
||||
container.view.addBlur(style: .dark) // Add background blur UIVisualEffectView
|
||||
}
|
||||
|
||||
func changeViewCustom() {
|
||||
|
||||
// Add custom shadow
|
||||
let layer = container.view.layer
|
||||
layer.shadowOpacity = 0.5
|
||||
layer.shadowColor = UIColor.red.cgColor
|
||||
layer.shadowOffset = CGSize(width: 1, height: 4)
|
||||
layer.shadowRadius = 5
|
||||
|
||||
// Add view in container.view
|
||||
let viewRed = UIView(frame: CGRect(x: 50, y: 50, width: 50, height: 50))
|
||||
viewRed.backgroundColor = .systemRed
|
||||
container.view.addSubview(viewRed)
|
||||
|
||||
// Add view under scrollView container.view
|
||||
let viewGreen = UIView(frame: CGRect(x: 25, y: 25, width: 50, height: 50))
|
||||
viewGreen.backgroundColor = .systemGreen
|
||||
container.view.insertSubview(viewGreen, at: 0)
|
||||
}
|
||||
|
||||
func createLayout() {
|
||||
|
||||
let layout = ContainerLayout()
|
||||
layout.startPosition = .hide
|
||||
layout.backgroundShadowShow = false
|
||||
layout.positions = ContainerPosition(top: 70, middle: 250, bottom: 70)
|
||||
|
||||
}
|
||||
|
||||
// MARK: - Change settings right away
|
||||
|
||||
func changeRightAway() {
|
||||
|
||||
// Properties
|
||||
container.set(movingEnabled: true)
|
||||
container.set(trackingPosition: false)
|
||||
container.set(footerPadding: 100)
|
||||
|
||||
// Add ScrollInsets Top/Bottom
|
||||
container.set(scrollIndicatorTop: 5) // ↓
|
||||
container.set(scrollIndicatorBottom: 5) // ↑
|
||||
|
||||
// Positions
|
||||
container.set(top: 70) // ↓
|
||||
container.set(middle: 250) // ↑
|
||||
container.set(bottom: 80) // ↑
|
||||
|
||||
// Middle Enable/Disable
|
||||
container.set(middle: 250)
|
||||
container.set(middle: nil)
|
||||
|
||||
// Background Shadow
|
||||
container.set(backgroundShadowShow: true)
|
||||
|
||||
// Insets View
|
||||
container.set(left: 5) // →
|
||||
container.set(right: 5) // ←
|
||||
|
||||
// Landscape params
|
||||
container.setLandscape(top: 30)
|
||||
container.setLandscape(middle: 150)
|
||||
container.setLandscape(bottom: 70)
|
||||
container.setLandscape(middle: nil)
|
||||
|
||||
container.setLandscape(backgroundShadowShow: false)
|
||||
|
||||
container.setLandscape(left: 10)
|
||||
container.setLandscape(right: 100)
|
||||
}
|
||||
}
|
||||
-269
@@ -1,269 +0,0 @@
|
||||
//
|
||||
// ExamplesAddTableViewController.swift
|
||||
// ContainerControllerSwift
|
||||
//
|
||||
// Created by mrustaa on 09.06.2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import ContainerControllerSwift
|
||||
|
||||
class ExamplesAddTableViewController: StoryboardController {
|
||||
|
||||
var containerTable: ContainerController!
|
||||
var containerCollection: ContainerController!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
|
||||
let layout = ContainerLayout()
|
||||
layout.backgroundShadowShow = true
|
||||
layout.positions = ContainerPosition(top: 70, middle: 250, bottom: 100)
|
||||
containerTable = ContainerController(addTo: self, layout: layout)
|
||||
containerTable.view.cornerRadius = 15
|
||||
containerTable.view.addShadow()
|
||||
containerTable.add(scrollView: addTableView())
|
||||
|
||||
|
||||
let layoutC = ContainerLayout()
|
||||
layoutC.positions = ContainerPosition(top: 100, middle: 250, bottom: 70)
|
||||
containerCollection = ContainerController(addTo: self, layout: layoutC)
|
||||
containerCollection.view.cornerRadius = 15
|
||||
containerCollection.view.addShadow()
|
||||
containerCollection.add(scrollView: addCollectionView())
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
containerTable.move(type: .top, completion: { [weak self] in
|
||||
guard let _self = self else { return }
|
||||
_self.containerCollection.move(type: .middle)
|
||||
})
|
||||
}
|
||||
|
||||
func addTableView() -> UITableView {
|
||||
|
||||
let tableView = UITableView()
|
||||
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "cell")
|
||||
tableView.delegate = self
|
||||
tableView.dataSource = self
|
||||
return tableView
|
||||
}
|
||||
|
||||
func addCollectionView() -> UICollectionView {
|
||||
|
||||
let layout = UICollectionViewFlowLayout()
|
||||
|
||||
let padding: CGFloat = 15
|
||||
layout.sectionInset = UIEdgeInsets(top: padding, left: padding, bottom: padding, right: padding)
|
||||
layout.minimumLineSpacing = padding
|
||||
layout.minimumInteritemSpacing = padding
|
||||
|
||||
let colletion = UICollectionView(frame: CGRect.zero, collectionViewLayout: layout)
|
||||
colletion.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "cell")
|
||||
colletion.backgroundColor = .clear
|
||||
colletion.delegate = self
|
||||
colletion.dataSource = self
|
||||
return colletion
|
||||
}
|
||||
|
||||
func changeViewParametrs() {
|
||||
|
||||
containerTable.view.cornerRadius = 15 // Change cornerRadius global
|
||||
containerTable.view.addShadow(opacity: 0.1) // Add layer shadow
|
||||
containerTable.view.addBlur(style: .dark) // Add background blur UIVisualEffectView
|
||||
}
|
||||
|
||||
func changeViewCustom() {
|
||||
|
||||
// Add custom shadow
|
||||
let layer = containerTable.view.layer
|
||||
layer.shadowOpacity = 0.5
|
||||
layer.shadowColor = UIColor.red.cgColor
|
||||
layer.shadowOffset = CGSize(width: 1, height: 4)
|
||||
layer.shadowRadius = 5
|
||||
|
||||
// Add view in container.view
|
||||
let viewRed = UIView(frame: CGRect(x: 50, y: 50, width: 50, height: 50))
|
||||
viewRed.backgroundColor = .systemRed
|
||||
containerTable.view.addSubview(viewRed)
|
||||
|
||||
// Add view under scrollView container.view
|
||||
let viewGreen = UIView(frame: CGRect(x: 25, y: 25, width: 50, height: 50))
|
||||
viewGreen.backgroundColor = .systemGreen
|
||||
containerTable.view.insertSubview(viewGreen, at: 0)
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Settings
|
||||
|
||||
|
||||
|
||||
func createLayout() {
|
||||
|
||||
let layout = ContainerLayout()
|
||||
layout.startPosition = .hide
|
||||
layout.backgroundShadowShow = false
|
||||
layout.positions = ContainerPosition(top: 70, middle: 250, bottom: 70)
|
||||
|
||||
}
|
||||
|
||||
// MARK: - change settings right away
|
||||
|
||||
func changeRightAway() {
|
||||
|
||||
// Properties
|
||||
containerTable.set(movingEnabled: true)
|
||||
containerTable.set(trackingPosition: false)
|
||||
containerTable.set(footerPadding: 100)
|
||||
|
||||
// Add ScrollInsets Top/Bottom
|
||||
containerTable.set(scrollIndicatorTop: 5) // ↓
|
||||
containerTable.set(scrollIndicatorBottom: 5) // ↑
|
||||
|
||||
// Positions
|
||||
containerTable.set(top: 70) // ↓
|
||||
containerTable.set(middle: 250) // ↑
|
||||
containerTable.set(bottom: 80) // ↑
|
||||
|
||||
// Middle Enable/Disable
|
||||
containerTable.set(middle: 250)
|
||||
containerTable.set(middle: nil)
|
||||
|
||||
// Background Shadow
|
||||
containerTable.set(backgroundShadowShow: true)
|
||||
|
||||
// Insets View
|
||||
containerTable.set(left: 5) // →
|
||||
containerTable.set(right: 5) // ←
|
||||
|
||||
// Landscape params
|
||||
containerTable.setLandscape(top: 30)
|
||||
containerTable.setLandscape(middle: 150)
|
||||
containerTable.setLandscape(bottom: 70)
|
||||
containerTable.setLandscape(middle: nil)
|
||||
|
||||
containerTable.setLandscape(backgroundShadowShow: false)
|
||||
|
||||
containerTable.setLandscape(left: 10)
|
||||
containerTable.setLandscape(right: 100)
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// MARK: - Scroll Delegate
|
||||
|
||||
extension ExamplesAddTableViewController: UIScrollViewDelegate {
|
||||
|
||||
func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
||||
if let table = scrollView as? UITableView {
|
||||
containerTable.scrollViewDidScroll(table)
|
||||
}
|
||||
if let colletion = scrollView as? UICollectionView {
|
||||
containerCollection.scrollViewDidScroll(colletion)
|
||||
}
|
||||
}
|
||||
|
||||
func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
|
||||
if let table = scrollView as? UITableView {
|
||||
containerTable.scrollViewWillBeginDragging(table)
|
||||
}
|
||||
if let colletion = scrollView as? UICollectionView {
|
||||
containerCollection.scrollViewWillBeginDragging(colletion)
|
||||
}
|
||||
}
|
||||
|
||||
func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
|
||||
if let table = scrollView as? UITableView {
|
||||
containerTable.scrollViewDidEndDecelerating(table)
|
||||
}
|
||||
if let colletion = scrollView as? UICollectionView {
|
||||
containerCollection.scrollViewDidEndDecelerating(colletion)
|
||||
}
|
||||
}
|
||||
|
||||
func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
|
||||
if let table = scrollView as? UITableView {
|
||||
containerTable.scrollViewDidEndDragging(table, willDecelerate: decelerate)
|
||||
}
|
||||
if let colletion = scrollView as? UICollectionView {
|
||||
containerCollection.scrollViewDidEndDragging(colletion, willDecelerate: decelerate)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Collection DataSource
|
||||
|
||||
extension ExamplesAddTableViewController: UICollectionViewDataSource {
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||
return 17
|
||||
}
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath)
|
||||
|
||||
let randomInt = Int.random(in: 0..<6)
|
||||
|
||||
var color: UIColor = .systemBlue
|
||||
|
||||
switch randomInt {
|
||||
case 0: color = .systemBlue
|
||||
case 1: color = .systemRed
|
||||
case 2: color = .systemGray
|
||||
case 3: color = .systemGreen
|
||||
case 4: color = .systemYellow
|
||||
case 5: color = .systemOrange
|
||||
default: break
|
||||
}
|
||||
|
||||
cell.backgroundColor = color
|
||||
cell.layer.cornerRadius = 12
|
||||
return cell
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Collection Layout
|
||||
|
||||
extension ExamplesAddTableViewController: UICollectionViewDelegateFlowLayout {
|
||||
|
||||
public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
|
||||
let size = ((ContainerDevice.width / 2) - 1) - 22
|
||||
return CGSize(width: size, height: size)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// MARK: - Table Delegate
|
||||
|
||||
extension ExamplesAddTableViewController: UITableViewDelegate {
|
||||
|
||||
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
|
||||
return 60
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Table DataSource
|
||||
|
||||
extension ExamplesAddTableViewController: UITableViewDataSource {
|
||||
|
||||
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
return 21
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
|
||||
cell.textLabel?.text = "item \(indexPath.row)"
|
||||
cell.backgroundColor = .clear
|
||||
return cell
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ class MapViewManager: NSObject {
|
||||
}
|
||||
|
||||
|
||||
// MARK: - 🗺 Map Show Route
|
||||
// MARK: - Map Show Route
|
||||
|
||||
public func showRouteOnMapMyLocation() {
|
||||
if let pickupCoord = mapView?.userLocation.location?.coordinate,
|
||||
@@ -165,7 +165,7 @@ class MapViewManager: NSObject {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - ⚠️ Map-Delegate
|
||||
// MARK: - Map-Delegate
|
||||
|
||||
extension MapViewManager: MKMapViewDelegate {
|
||||
|
||||
@@ -209,7 +209,7 @@ extension MapViewManager: MKMapViewDelegate {
|
||||
|
||||
}
|
||||
|
||||
// MARK: - ⚠️ Update Location Delegate
|
||||
// MARK: - Update Location Delegate
|
||||
|
||||
extension MapViewManager: CLLocationManagerDelegate {
|
||||
|
||||
@@ -236,7 +236,7 @@ extension MapViewManager: CLLocationManagerDelegate {
|
||||
|
||||
}
|
||||
|
||||
// MARK: - 🗺 Map Extension
|
||||
// MARK: - Map Extension
|
||||
|
||||
extension MKCoordinateRegion {
|
||||
var mapRect: MKMapRect {
|
||||
|
||||
@@ -170,7 +170,7 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
mapManager.compass.y = (paddingTop + mapButtons.height + 12)
|
||||
}
|
||||
|
||||
// MARK: - 🗺 Map Manager
|
||||
// MARK: - Map Manager
|
||||
|
||||
func updateMapManager() {
|
||||
|
||||
@@ -186,7 +186,7 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - 🗺 Map Long-Press
|
||||
// MARK: - Map Long-Press
|
||||
|
||||
@IBAction func handleLong(_ recognizer: UILongPressGestureRecognizer) {
|
||||
if routeContainer != nil { return }
|
||||
@@ -239,7 +239,7 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
})
|
||||
}
|
||||
|
||||
// MARK: - 🗺 Map Buttons Alpha
|
||||
// MARK: - Map Buttons Alpha
|
||||
|
||||
func mapButtons(alpha: CGFloat, animation: Bool = true) {
|
||||
if ContainerDevice.isPortrait, !ContainerDevice.isIpad {
|
||||
@@ -330,7 +330,7 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
setNeedsStatusBarAppearanceUpdate()
|
||||
}
|
||||
|
||||
// MARK: - 🦄 Show Maps-Container
|
||||
// MARK: - Show Maps-Container
|
||||
|
||||
func showMapsContainer() {
|
||||
mapsContainer = MapsContainerController(addTo: self, darkStyle: darkStyle)
|
||||
@@ -349,7 +349,7 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
changePositionMapsElements(container: mapsContainerController, position: position, type: type, animation: animation)
|
||||
}
|
||||
|
||||
//MARK: - 🦄 Show Location-Details
|
||||
//MARK: - Show Location-Details
|
||||
|
||||
func showLocationDetailsContainer() {
|
||||
if locationContainer != nil { return }
|
||||
@@ -383,7 +383,7 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
changePositionMapsElements(container: locationContainerController, position: position, type: type, animation: animation)
|
||||
}
|
||||
|
||||
//MARK: - 🦄 Show Route
|
||||
//MARK: - Show Route
|
||||
|
||||
func showRouteContainer() {
|
||||
if routeContainer != nil { return }
|
||||
@@ -408,7 +408,7 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
changePositionMapsElements(container: routeContainerController, position: position, type: type, animation: animation)
|
||||
}
|
||||
|
||||
// MARK: - 🦄 Show Menu-Container
|
||||
// MARK: - Show Menu-Container
|
||||
|
||||
func showMenuContainer() {
|
||||
if menuContainer != nil { return }
|
||||
|
||||
@@ -23,9 +23,10 @@ class ViewController: UIViewController {
|
||||
navigationController?.interactivePopGestureRecognizer?.isEnabled = true
|
||||
|
||||
items = [
|
||||
TitleTextItem(title: "Maps.app", clss: MapsViewController.self),
|
||||
TitleTextItem(title: "Example. Settings", clss: ExamplesSettingsViewController.self),
|
||||
TitleTextItem(title: "Example. Add TableView", clss: ExamplesAddTableViewController.self)
|
||||
TitleTextItem(title: "Maps.app", clss: MapsViewController.self),
|
||||
TitleTextItem(title: "Example. Settings", clss: ExamplesSettingsViewController.self),
|
||||
TitleTextItem(title: "Example. Add UITableView", clss: ExampleAddTableViewController.self),
|
||||
TitleTextItem(title: "Example. Add UICollectionView", clss: ExampleAddCollectionViewController.self)
|
||||
]
|
||||
|
||||
tableView?.set(items: items, animated: true)
|
||||
|
||||
Reference in new issue
Block a user