Compare commits
53 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8bff1e5c24 | |||
| 4f1ca8157a | |||
| 8d6589004b | |||
| 3993d4d003 | |||
| f2e8d4411f | |||
| 3c2848ffd1 | |||
| f162d50891 | |||
| 9f34fcb70c | |||
| fed617321f | |||
| 139082d366 | |||
| ca43421a8f | |||
| 08975badd3 | |||
| 72759913ae | |||
| 410f53dc1c | |||
| 7916101d7b | |||
| 17313e2bd3 | |||
| fc09d21272 | |||
| 1b85dfa196 | |||
| 830bceb3cb | |||
| 8b467a2b59 | |||
| 7656a3f287 | |||
| aa2f484b6b | |||
| fd21f9adb7 | |||
| ffb3e42939 | |||
| a59bacaf89 | |||
| ab373c569a | |||
| 29c7b63352 | |||
| 45a2479733 | |||
| 36ec1c3d12 | |||
| 59832f0e4b | |||
| f77b041bce | |||
| 07ddae83a0 | |||
| 7ae64d9350 | |||
| 51b9c84daa | |||
| 211dcf48a6 | |||
| e3ae3d440e | |||
| 87b208dc1b | |||
| 9449d4d9d6 | |||
| 5249c14314 | |||
| f95ba4f1e4 | |||
| ad9dfd7f5a | |||
| 6d7e1a010b | |||
| 262727193c | |||
| a17e142cfa | |||
| 99591d784f | |||
| c4ff71566c | |||
| 1418eeda0f | |||
| 8aeab6b534 | |||
| 45ef8d369f | |||
| 8e4786465a | |||
| 353468f82a | |||
| f2c2dec7e9 | |||
| f71316aded |
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'ContainerControllerSwift'
|
||||
s.version = '1.0.7'
|
||||
s.version = '1.1.4'
|
||||
s.summary = 'This is a swipe-panel from application: https://www.apple.com/ios/maps/'
|
||||
|
||||
# This description is used to generate tags and improve search results.
|
||||
@@ -33,9 +33,8 @@ TODO: Add long description of the pod here.
|
||||
# s.ios.deployment_target = '13.0'
|
||||
s.platform = :ios, "13.0"
|
||||
|
||||
s.source_files = 'ContainerControllerSwift/*.{swift}'
|
||||
s.source_files = 'ContainerControllerSwift/ContainerTable/*.{swift}'
|
||||
s.source_files = 'ContainerControllerSwift/ContainerCollection/*.{swift}'
|
||||
s.source_files = 'Sources/**/*.{swift}'
|
||||
|
||||
s.framework = "UIKit"
|
||||
# s.ios.framework = 'UIKit'
|
||||
# s.resource_bundles = {
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
#
|
||||
# Be sure to run `pod lib lint ContainerControllerSwift.podspec' to ensure this is a
|
||||
# valid spec before submitting.
|
||||
#
|
||||
# Any lines starting with a # are optional, but their use is encouraged
|
||||
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
|
||||
#
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'ContainerControllerSwift'
|
||||
s.version = '1.0.2'
|
||||
s.summary = 'This is a swipe-panel from application: https://www.apple.com/ios/maps/'
|
||||
|
||||
# This description is used to generate tags and improve search results.
|
||||
# * Think: What does it do? Why did you write it? What is the focus?
|
||||
# * Try to keep it short, snappy and to the point.
|
||||
# * Write the description between the DESC delimiters below.
|
||||
# * Finally, don't worry about the indent, CocoaPods strips it!
|
||||
|
||||
s.description = <<-DESC
|
||||
TODO: Add long description of the pod here.
|
||||
'This is a swipe-panel from application: https://www.apple.com/ios/maps/'
|
||||
DESC
|
||||
|
||||
s.homepage = 'https://github.com/mrustaa/ContainerController'
|
||||
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
s.author = { 'rustamburger@gmail.com' => 'rustamburger@gmail.com' }
|
||||
s.source = { :git => 'https://github.com/mrustaa/ContainerController.git', :tag => s.version.to_s }
|
||||
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
|
||||
|
||||
s.swift_version = '5.2.4'
|
||||
s.ios.deployment_target = '13.0'
|
||||
|
||||
s.source_files = 'ContainerControllerSwift/*.{swift}'
|
||||
s.source_files = 'ContainerControllerSwift/**/*.{swift}'
|
||||
|
||||
# s.resource_bundles = {
|
||||
# 'ContainerControllerSwift' => ['ContainerControllerSwift/Assets/*.png']
|
||||
# }
|
||||
|
||||
# s.public_header_files = 'Pod/Classes/**/*.h'
|
||||
# s.frameworks = 'UIKit', 'MapKit'
|
||||
# s.dependency 'AFNetworking', '~> 2.3'
|
||||
end
|
||||
@@ -1,27 +0,0 @@
|
||||
//
|
||||
// TableAdapterCellData.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by Рустам Мотыгуллин on 17/04/2020.
|
||||
// Copyright © 2020 mrusta. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class TableAdapterCellData: NSObject {
|
||||
|
||||
// public let cellIdentifier: String
|
||||
//
|
||||
// public init(cellIdentifier: String? = UUID().uuidString) {
|
||||
// self.cellIdentifier = cellIdentifier ?? UUID().uuidString
|
||||
// }
|
||||
|
||||
open func cellHeight() -> CGFloat {
|
||||
return UITableView.automaticDimension
|
||||
}
|
||||
|
||||
open func canEditing() -> Bool {
|
||||
return false
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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 */; };
|
||||
@@ -102,33 +100,25 @@
|
||||
46ACF0D52490FEB300FAAD43 /* ExamplesContainerControllerScrollType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46ACF0BF2490FEB300FAAD43 /* ExamplesContainerControllerScrollType.swift */; };
|
||||
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 */; };
|
||||
607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; };
|
||||
607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; };
|
||||
607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; };
|
||||
76B8DCAE51106B56EBBCCF22 /* Pods_ContainerControllerSwift_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8903A29B31F63B5A7A8607B /* Pods_ContainerControllerSwift_Tests.framework */; };
|
||||
968DB7E5EF2DD4AE15D171EB /* Pods_ContainerControllerSwift_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 121FB933CAE3EC5A2A00F4B2 /* Pods_ContainerControllerSwift_Example.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 607FACC81AFB9204008FA782 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 607FACCF1AFB9204008FA782;
|
||||
remoteInfo = ContainerControllerSwift;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
01C7EF19A8C89AA4D02D74D2 /* Pods-ContainerControllerSwift_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ContainerControllerSwift_Tests.debug.xcconfig"; path = "Target Support Files/Pods-ContainerControllerSwift_Tests/Pods-ContainerControllerSwift_Tests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
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>"; };
|
||||
@@ -224,18 +214,21 @@
|
||||
46ACF0BF2490FEB300FAAD43 /* ExamplesContainerControllerScrollType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExamplesContainerControllerScrollType.swift; sourceTree = "<group>"; };
|
||||
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>"; };
|
||||
607FACD01AFB9204008FA782 /* ContainerControllerSwift_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ContainerControllerSwift_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
46ACF0D82491A75300FAAD43 /* screenLandscape5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = screenLandscape5.png; sourceTree = "<group>"; };
|
||||
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>"; };
|
||||
607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
|
||||
607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
|
||||
607FACE51AFB9204008FA782 /* ContainerControllerSwift_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ContainerControllerSwift_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = "<group>"; };
|
||||
84550121AB9630F101ECE515 /* Pods-ContainerControllerSwift_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ContainerControllerSwift_Example.release.xcconfig"; path = "Target Support Files/Pods-ContainerControllerSwift_Example/Pods-ContainerControllerSwift_Example.release.xcconfig"; sourceTree = "<group>"; };
|
||||
95BE06AF27887E1C134436AD /* ContainerControllerSwift.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = ContainerControllerSwift.podspec; path = ../ContainerControllerSwift.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
|
||||
95BE06AF27887E1C134436AD /* ContainerControllerSwift.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = ContainerControllerSwift.podspec; path = ../ContainerControllerSwift.podspec; sourceTree = "<group>"; };
|
||||
D8903A29B31F63B5A7A8607B /* Pods_ContainerControllerSwift_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ContainerControllerSwift_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DF5E269035BE15FBD5F947F3 /* Pods-ContainerControllerSwift_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ContainerControllerSwift_Tests.release.xcconfig"; path = "Target Support Files/Pods-ContainerControllerSwift_Tests/Pods-ContainerControllerSwift_Tests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
E0FB46D7C5BC0F8759A83A60 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
|
||||
@@ -250,14 +243,6 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
607FACE21AFB9204008FA782 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
76B8DCAE51106B56EBBCCF22 /* Pods_ContainerControllerSwift_Tests.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
@@ -275,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>";
|
||||
@@ -301,28 +287,12 @@
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
46ACEFDA2490F52500FAAD43 /* LoadNib */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
46ACEFDB2490F52500FAAD43 /* Controller */,
|
||||
46ACEFDD2490F52500FAAD43 /* View */,
|
||||
);
|
||||
path = LoadNib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
46ACEFDB2490F52500FAAD43 /* Controller */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
46ACEFDC2490F52500FAAD43 /* StoryboardController.swift */,
|
||||
);
|
||||
path = Controller;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
46ACEFDD2490F52500FAAD43 /* View */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
46ACEFDE2490F52500FAAD43 /* XibView.swift */,
|
||||
);
|
||||
path = View;
|
||||
path = LoadNib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
46ACEFDF2490F52500FAAD43 /* DesignableViews */ = {
|
||||
@@ -881,12 +851,20 @@
|
||||
path = Container;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
46ACF0DA2492297100FAAD43 /* ExampleAddCollectionView */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
46ACF0E2249255ED00FAAD43 /* ExampleAddCollectionViewController.swift */,
|
||||
46ACF0E1249255ED00FAAD43 /* ExampleAddCollectionViewController.storyboard */,
|
||||
);
|
||||
path = ExampleAddCollectionView;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
607FACC71AFB9204008FA782 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
607FACF51AFB993E008FA782 /* Podspec Metadata */,
|
||||
607FACD21AFB9204008FA782 /* Example for ContainerControllerSwift */,
|
||||
607FACE81AFB9204008FA782 /* Tests */,
|
||||
607FACF51AFB993E008FA782 /* Podspec */,
|
||||
607FACD21AFB9204008FA782 /* Example */,
|
||||
607FACD11AFB9204008FA782 /* Products */,
|
||||
22F538CF8601A849D034CF8B /* Pods */,
|
||||
AD5BB6CA5AB2437952B3E0A8 /* Frameworks */,
|
||||
@@ -896,65 +874,49 @@
|
||||
607FACD11AFB9204008FA782 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
607FACD01AFB9204008FA782 /* ContainerControllerSwift_Example.app */,
|
||||
607FACE51AFB9204008FA782 /* ContainerControllerSwift_Tests.xctest */,
|
||||
607FACD01AFB9204008FA782 /* ContainerController.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
607FACD21AFB9204008FA782 /* Example for ContainerControllerSwift */ = {
|
||||
607FACD21AFB9204008FA782 /* Example */ = {
|
||||
isa = PBXGroup;
|
||||
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 */,
|
||||
607FACD91AFB9204008FA782 /* Main.storyboard */,
|
||||
607FACDC1AFB9204008FA782 /* Images.xcassets */,
|
||||
607FACDE1AFB9204008FA782 /* LaunchScreen.xib */,
|
||||
607FACDC1AFB9204008FA782 /* Images.xcassets */,
|
||||
607FACD31AFB9204008FA782 /* Supporting Files */,
|
||||
);
|
||||
name = "Example for ContainerControllerSwift";
|
||||
name = Example;
|
||||
path = ContainerControllerSwift;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
607FACD31AFB9204008FA782 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
46ACF0D82491A75300FAAD43 /* screenLandscape5.png */,
|
||||
607FACD41AFB9204008FA782 /* Info.plist */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
607FACE81AFB9204008FA782 /* Tests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
607FACEB1AFB9204008FA782 /* Tests.swift */,
|
||||
607FACE91AFB9204008FA782 /* Supporting Files */,
|
||||
);
|
||||
path = Tests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
607FACE91AFB9204008FA782 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
607FACEA1AFB9204008FA782 /* Info.plist */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
607FACF51AFB993E008FA782 /* Podspec Metadata */ = {
|
||||
607FACF51AFB993E008FA782 /* Podspec */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
95BE06AF27887E1C134436AD /* ContainerControllerSwift.podspec */,
|
||||
1034FE614CC8890CE063531F /* README.md */,
|
||||
E0FB46D7C5BC0F8759A83A60 /* LICENSE */,
|
||||
);
|
||||
name = "Podspec Metadata";
|
||||
name = Podspec;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
AD5BB6CA5AB2437952B3E0A8 /* Frameworks */ = {
|
||||
@@ -985,28 +947,9 @@
|
||||
);
|
||||
name = ContainerControllerSwift_Example;
|
||||
productName = ContainerControllerSwift;
|
||||
productReference = 607FACD01AFB9204008FA782 /* ContainerControllerSwift_Example.app */;
|
||||
productReference = 607FACD01AFB9204008FA782 /* ContainerController.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
607FACE41AFB9204008FA782 /* ContainerControllerSwift_Tests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ContainerControllerSwift_Tests" */;
|
||||
buildPhases = (
|
||||
A0AFE6DE4C88627AC97D4DF0 /* [CP] Check Pods Manifest.lock */,
|
||||
607FACE11AFB9204008FA782 /* Sources */,
|
||||
607FACE21AFB9204008FA782 /* Frameworks */,
|
||||
607FACE31AFB9204008FA782 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
607FACE71AFB9204008FA782 /* PBXTargetDependency */,
|
||||
);
|
||||
name = ContainerControllerSwift_Tests;
|
||||
productName = Tests;
|
||||
productReference = 607FACE51AFB9204008FA782 /* ContainerControllerSwift_Tests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
@@ -1022,12 +965,6 @@
|
||||
DevelopmentTeam = Y7546NLJW9;
|
||||
LastSwiftMigration = 0900;
|
||||
};
|
||||
607FACE41AFB9204008FA782 = {
|
||||
CreatedOnToolsVersion = 6.3.1;
|
||||
DevelopmentTeam = Y7546NLJW9;
|
||||
LastSwiftMigration = 0900;
|
||||
TestTargetID = 607FACCF1AFB9204008FA782;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "ContainerControllerSwift" */;
|
||||
@@ -1045,7 +982,6 @@
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
607FACCF1AFB9204008FA782 /* ContainerControllerSwift_Example */,
|
||||
607FACE41AFB9204008FA782 /* ContainerControllerSwift_Tests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
@@ -1075,16 +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 */,
|
||||
@@ -1096,13 +1034,6 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
607FACE31AFB9204008FA782 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
@@ -1146,28 +1077,6 @@
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ContainerControllerSwift_Example/Pods-ContainerControllerSwift_Example-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
A0AFE6DE4C88627AC97D4DF0 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-ContainerControllerSwift_Tests-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
@@ -1177,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 */,
|
||||
@@ -1200,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 */,
|
||||
@@ -1229,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 */,
|
||||
@@ -1240,24 +1151,8 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
607FACE11AFB9204008FA782 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
607FACEC1AFB9204008FA782 /* Tests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
607FACE71AFB9204008FA782 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 607FACCF1AFB9204008FA782 /* ContainerControllerSwift_Example */;
|
||||
targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
46ACEFE32490F52500FAAD43 /* Localizable.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
@@ -1412,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;
|
||||
};
|
||||
@@ -1428,55 +1323,13 @@
|
||||
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;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
607FACF31AFB9204008FA782 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 01C7EF19A8C89AA4D02D74D2 /* Pods-ContainerControllerSwift_Tests.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
DEVELOPMENT_TEAM = Y7546NLJW9;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
INFOPLIST_FILE = Tests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ContainerControllerSwift_Example.app/ContainerControllerSwift_Example";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
607FACF41AFB9204008FA782 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = DF5E269035BE15FBD5F947F3 /* Pods-ContainerControllerSwift_Tests.release.xcconfig */;
|
||||
buildSettings = {
|
||||
DEVELOPMENT_TEAM = Y7546NLJW9;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
|
||||
"$(inherited)",
|
||||
);
|
||||
INFOPLIST_FILE = Tests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ContainerControllerSwift_Example.app/ContainerControllerSwift_Example";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
@@ -1498,15 +1351,6 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ContainerControllerSwift_Tests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
607FACF31AFB9204008FA782 /* Debug */,
|
||||
607FACF41AFB9204008FA782 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 607FACC81AFB9204008FA782 /* Project object */;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
|
||||
BuildableName = "ContainerControllerSwift_Example.app"
|
||||
BuildableName = "ContainerController.app"
|
||||
BlueprintName = "ContainerControllerSwift_Example"
|
||||
ReferencedContainer = "container:ContainerControllerSwift.xcodeproj">
|
||||
</BuildableReference>
|
||||
@@ -45,7 +45,7 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
|
||||
BuildableName = "ContainerControllerSwift_Example.app"
|
||||
BuildableName = "ContainerController.app"
|
||||
BlueprintName = "ContainerControllerSwift_Example"
|
||||
ReferencedContainer = "container:ContainerControllerSwift.xcodeproj">
|
||||
</BuildableReference>
|
||||
@@ -78,7 +78,7 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
|
||||
BuildableName = "ContainerControllerSwift_Example.app"
|
||||
BuildableName = "ContainerController.app"
|
||||
BlueprintName = "ContainerControllerSwift_Example"
|
||||
ReferencedContainer = "container:ContainerControllerSwift.xcodeproj">
|
||||
</BuildableReference>
|
||||
@@ -95,7 +95,7 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
|
||||
BuildableName = "ContainerControllerSwift_Example.app"
|
||||
BuildableName = "ContainerController.app"
|
||||
BlueprintName = "ContainerControllerSwift_Example"
|
||||
ReferencedContainer = "container:ContainerControllerSwift.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:..">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:ContainerControllerSwift.xcodeproj">
|
||||
</FileRef>
|
||||
|
||||
@@ -1,46 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_0" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 CocoaPods. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
|
||||
<rect key="frame" x="20" y="439" width="441" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ContainerControllerSwift" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
|
||||
<rect key="frame" x="20" y="140" width="441" height="43"/>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ContainerController Swift" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
|
||||
<rect key="frame" x="20" y="169" width="280" height="43"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="screenLandscape5.png" translatesAutoresizingMaskIntoConstraints="NO" id="c2h-J4-UI4">
|
||||
<rect key="frame" x="15" y="60" width="290" height="508"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
|
||||
<constraint firstItem="c2h-J4-UI4" firstAttribute="height" secondItem="iN0-l3-epB" secondAttribute="height" multiplier="0.894089" id="6Pl-Y0-TbW"/>
|
||||
<constraint firstItem="c2h-J4-UI4" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="15" id="8cY-so-aq9"/>
|
||||
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
|
||||
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
|
||||
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
|
||||
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
|
||||
<constraint firstAttribute="trailing" secondItem="c2h-J4-UI4" secondAttribute="trailing" constant="15" id="Tlx-R0-BaC"/>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
|
||||
<constraint firstAttribute="bottom" secondItem="c2h-J4-UI4" secondAttribute="bottom" id="nuV-b0-dKE"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<point key="canvasLocation" x="548" y="455"/>
|
||||
<point key="canvasLocation" x="544.79999999999995" y="453.69458128078821"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="screenLandscape5.png" width="685.5" height="302.5"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -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="22155" 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="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>
|
||||
<!--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>
|
||||
@@ -38,21 +40,32 @@
|
||||
</objects>
|
||||
<point key="canvasLocation" x="132" y="137.18140929535232"/>
|
||||
</scene>
|
||||
<!--Light Content Navigation Controller-->
|
||||
<scene sceneID="2WA-6t-2aK">
|
||||
<!--Navigation Controller-->
|
||||
<scene sceneID="jWl-Kd-Y9J">
|
||||
<objects>
|
||||
<navigationController id="aV9-EX-QWJ" customClass="LightContentNavigationController" customModule="ContainerControllerSwift_Example" customModuleProvider="target" 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.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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>
|
||||
<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>
|
||||
<!--Example Add Collection View Controller-->
|
||||
<scene sceneID="0f9-5i-ygC">
|
||||
<objects>
|
||||
<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"/>
|
||||
<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>
|
||||
@@ -0,0 +1,117 @@
|
||||
//
|
||||
// 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()
|
||||
|
||||
title = "Example Add CollectionView"
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
<?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>
|
||||
<!--Examples Add Table View Controller-->
|
||||
<!--Example Add Table 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="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"/>
|
||||
<color key="backgroundColor" systemColor="opaqueSeparatorColor"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Uzt-sR-4xA" sceneMemberID="firstResponder"/>
|
||||
@@ -23,4 +25,9 @@
|
||||
<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>
|
||||
@@ -0,0 +1,94 @@
|
||||
//
|
||||
// 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()
|
||||
|
||||
title = "Example Add TableView"
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
@@ -1,273 +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 var prefersStatusBarHidden: Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// ExamplesContainerController.swift
|
||||
// ContainerController
|
||||
//
|
||||
// Created by Рустам Мотыгуллин on 31/05/2020.
|
||||
// Copyright © 2020 mrusta. All rights reserved.
|
||||
// Created by mrustaa on 31/05/2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// ExamplesContainerControllerScrollType.swift
|
||||
// ContainerController
|
||||
//
|
||||
// Created by Рустам Мотыгуллин on 03/06/2020.
|
||||
// Copyright © 2020 mrusta. All rights reserved.
|
||||
// Created by mrustaa on 03/06/2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// ExamplesScrollViews.swift
|
||||
// ContainerController
|
||||
//
|
||||
// Created by Рустам Мотыгуллин on 30/05/2020.
|
||||
// Copyright © 2020 mrusta. All rights reserved.
|
||||
// Created by mrustaa on 30/05/2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
@@ -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 ]
|
||||
@@ -36,10 +38,6 @@ class ExamplesSettingsViewController: StoryboardController {
|
||||
}
|
||||
}
|
||||
|
||||
override var prefersStatusBarHidden: Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// MARK: - Load TableView
|
||||
|
||||
func loadTableView() {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// ExampleCell.swift
|
||||
// ContainerController
|
||||
//
|
||||
// Created by Рустам Мотыгуллин on 28/05/2020.
|
||||
// Copyright © 2020 mrusta. All rights reserved.
|
||||
// Created by mrustaa on 28/05/2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// ExampleCellStyle.swift
|
||||
// ContainerController
|
||||
//
|
||||
// Created by Рустам Мотыгуллин on 02/06/2020.
|
||||
// Copyright © 2020 mrusta. All rights reserved.
|
||||
// Created by mrustaa on 02/06/2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.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="15704"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="64" id="ADc-Wu-299" customClass="TitleTextCell" customModule="ContainerController" customModuleProvider="target">
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="64" id="ADc-Wu-299" customClass="TitleTextCell" customModule="ContainerControllerSwift_Example" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="64"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="ADc-Wu-299" id="Qrk-n6-aPT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="64"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Контроллер" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MbP-dL-b7J">
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Tite" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MbP-dL-b7J">
|
||||
<rect key="frame" x="16" y="12" width="360" height="14"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="14" id="ybu-0n-7d1"/>
|
||||
@@ -24,7 +24,7 @@
|
||||
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Введите название компании" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="erD-8k-fq0">
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Subtitle subtitle subtitle" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="erD-8k-fq0">
|
||||
<rect key="frame" x="16" y="32" width="360" height="19"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="19" id="DgX-EK-d6R"/>
|
||||
|
||||
@@ -5,23 +5,6 @@ import UIKit
|
||||
@IBDesignable
|
||||
class DesignButton: UIButton {
|
||||
|
||||
/*
|
||||
// @IBInspectable var cornerRadius: CGFloat = 0.0 {
|
||||
// didSet {
|
||||
// let minSize = min(frame.size.width, frame.size.height)
|
||||
// let radius = ((cornerRadius < 0) ? (minSize / 2) : cornerRadius)
|
||||
// self.layer.cornerRadius = radius
|
||||
// }
|
||||
// }
|
||||
|
||||
// UIGraphicsBeginImageContextWithOptions(glayer.frame.size, false, UIScreen.main.scale)
|
||||
// UIGraphicsBeginImageContext(glayer.frame.size)
|
||||
// glayer.render(in:UIGraphicsGetCurrentContext()!)
|
||||
// let image = UIGraphicsGetImageFromCurrentImageContext()
|
||||
// UIGraphicsEndImageContext()
|
||||
// setImage(image, for: .normal)
|
||||
*/
|
||||
|
||||
@IBInspectable var hideAnimation: Bool = true
|
||||
|
||||
@IBInspectable var fillColor: UIColor = .clear
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// StoryboardController.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by Рустам Мотыгуллин on 20/04/2020.
|
||||
// Copyright © 2020 mrusta. All rights reserved.
|
||||
// Created by mrustaa on 20/04/2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
@@ -2,8 +2,8 @@
|
||||
// XibView.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by Рустам Мотыгуллин on 19/04/2020.
|
||||
// Copyright © 2020 mrusta. All rights reserved.
|
||||
// Created by mrustaa on 19/04/2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
@@ -0,0 +1,116 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom": "iphone",
|
||||
"filename" : "appIcon-20@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom": "iphone",
|
||||
"filename" : "appIcon-20@3x.png",
|
||||
"scale": "3x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom": "ipad",
|
||||
"filename" : "appIcon-20.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom": "ipad",
|
||||
"filename" : "appIcon-20@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "appIcon-29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "appIcon-29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "appIcon-40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "appIcon-40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "appIcon-60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "appIcon-60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "appIcon-29.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "appIcon-29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "appIcon-40.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "appIcon-40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "appIcon-76.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "appIcon-76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "appIcon-83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "appIcon-1024.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 404 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 22 KiB |
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIApplicationSceneManifest</key>
|
||||
<dict>
|
||||
<key>UIApplicationSupportsMultipleScenes</key>
|
||||
<false/>
|
||||
<key>UISceneConfigurations</key>
|
||||
<dict>
|
||||
<key>UIWindowSceneSessionRoleApplication</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UISceneConfigurationName</key>
|
||||
<string>Default Configuration</string>
|
||||
<key>UISceneDelegateClassName</key>
|
||||
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
|
||||
<key>UISceneStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
"LNG_MAPS_HR" = "hr";
|
||||
"LNG_MAPS_WHERE" = "То";
|
||||
"LNG_MAPS_WHERE" = "To";
|
||||
"LNG_MAPS_FROM" = "From";
|
||||
"LNG_MAPS_MY_LOCATION" = "My Location";
|
||||
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +110,7 @@ class MapViewManager: NSObject {
|
||||
}
|
||||
|
||||
|
||||
// MARK: - 🗺 Map Show Route
|
||||
// MARK: - Map Show Route
|
||||
|
||||
public func showRouteOnMapMyLocation() {
|
||||
if let pickupCoord = mapView?.userLocation.location?.coordinate,
|
||||
@@ -165,7 +168,7 @@ class MapViewManager: NSObject {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - ⚠️ Map-Delegate
|
||||
// MARK: - Map-Delegate
|
||||
|
||||
extension MapViewManager: MKMapViewDelegate {
|
||||
|
||||
@@ -209,7 +212,7 @@ extension MapViewManager: MKMapViewDelegate {
|
||||
|
||||
}
|
||||
|
||||
// MARK: - ⚠️ Update Location Delegate
|
||||
// MARK: - Update Location Delegate
|
||||
|
||||
extension MapViewManager: CLLocationManagerDelegate {
|
||||
|
||||
@@ -236,7 +239,7 @@ extension MapViewManager: CLLocationManagerDelegate {
|
||||
|
||||
}
|
||||
|
||||
// MARK: - 🗺 Map Extension
|
||||
// MARK: - Map Extension
|
||||
|
||||
extension MKCoordinateRegion {
|
||||
var mapRect: MKMapRect {
|
||||
|
||||
@@ -56,9 +56,6 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
startAnimationMapElements()
|
||||
}
|
||||
|
||||
override var prefersStatusBarHidden: Bool {
|
||||
return true
|
||||
}
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
@@ -107,6 +104,9 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
// MARK: - Rotation Callback
|
||||
|
||||
@objc func rotated() {
|
||||
|
||||
if !UIDevice.current.orientation.isRotateAllowed { return }
|
||||
|
||||
updateMapViewTopPadding()
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
mapManager.compass.y = (paddingTop + mapButtons.height + 12)
|
||||
}
|
||||
|
||||
// MARK: - 🗺 Map Manager
|
||||
// MARK: - Map Manager
|
||||
|
||||
func updateMapManager() {
|
||||
|
||||
@@ -185,7 +185,7 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - 🗺 Map Long-Press
|
||||
// MARK: - Map Long-Press
|
||||
|
||||
@IBAction func handleLong(_ recognizer: UILongPressGestureRecognizer) {
|
||||
if routeContainer != nil { return }
|
||||
@@ -238,7 +238,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 {
|
||||
@@ -329,7 +329,7 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
setNeedsStatusBarAppearanceUpdate()
|
||||
}
|
||||
|
||||
// MARK: - 🦄 Show Maps-Container
|
||||
// MARK: - Show Maps-Container
|
||||
|
||||
func showMapsContainer() {
|
||||
mapsContainer = MapsContainerController(addTo: self, darkStyle: darkStyle)
|
||||
@@ -348,7 +348,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 }
|
||||
@@ -382,7 +382,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 }
|
||||
@@ -407,7 +407,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 }
|
||||
|
||||
@@ -15,8 +15,8 @@ class MapsRouteCellItem: TableAdapterItem {
|
||||
separator: Bool = true,
|
||||
selected: Bool = false) {
|
||||
|
||||
let cellData = MapsRouteCellData(title ?? "42 мин",
|
||||
subtitle ?? "улица Поляны\nСамый быстрый",
|
||||
let cellData = MapsRouteCellData(title ?? "42 min",
|
||||
subtitle ?? "Street Polyany\nFastest",
|
||||
darkStyle,
|
||||
separator,
|
||||
selected)
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// SceneDelegate.swift
|
||||
// dwadwa
|
||||
//
|
||||
// Created by Рустам Мотыгуллин on 09.06.2020.
|
||||
// Copyright © 2020 mrusta. All rights reserved.
|
||||
// Created by mrustaa on 09.06.2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
@@ -9,15 +9,6 @@
|
||||
import UIKit
|
||||
import ContainerControllerSwift
|
||||
|
||||
class LightContentNavigationController: UINavigationController {
|
||||
override var prefersStatusBarHidden: Bool {
|
||||
return true
|
||||
}
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle {
|
||||
return .lightContent
|
||||
}
|
||||
}
|
||||
|
||||
class ViewController: UIViewController {
|
||||
|
||||
@IBOutlet weak var tableView: TableAdapterView?
|
||||
@@ -26,15 +17,18 @@ class ViewController: UIViewController {
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
configureNavigationBar(largeTitleColor: .label, backgoundColor: .systemGroupedBackground, tintColor: .systemBlue, title: "ContainerController", preferredLargeTitle: false)
|
||||
|
||||
title = "ContainerController"
|
||||
|
||||
navigationController?.interactivePopGestureRecognizer?.delegate = self
|
||||
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)
|
||||
@@ -51,15 +45,37 @@ class ViewController: UIViewController {
|
||||
}
|
||||
|
||||
}
|
||||
override var prefersStatusBarHidden: Bool {
|
||||
return true
|
||||
}
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle {
|
||||
return .lightContent
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension ViewController {
|
||||
func configureNavigationBar(largeTitleColor: UIColor, backgoundColor: UIColor, tintColor: UIColor, title: String, preferredLargeTitle: Bool) {
|
||||
if #available(iOS 13.0, *) {
|
||||
let navBarAppearance = UINavigationBarAppearance()
|
||||
navBarAppearance.configureWithOpaqueBackground()
|
||||
navBarAppearance.largeTitleTextAttributes = [.foregroundColor: largeTitleColor]
|
||||
navBarAppearance.titleTextAttributes = [.foregroundColor: largeTitleColor]
|
||||
navBarAppearance.backgroundColor = backgoundColor
|
||||
|
||||
navigationController?.navigationBar.standardAppearance = navBarAppearance
|
||||
navigationController?.navigationBar.compactAppearance = navBarAppearance
|
||||
navigationController?.navigationBar.scrollEdgeAppearance = navBarAppearance
|
||||
|
||||
navigationController?.navigationBar.prefersLargeTitles = preferredLargeTitle
|
||||
navigationController?.navigationBar.isTranslucent = false
|
||||
navigationController?.navigationBar.tintColor = tintColor
|
||||
navigationItem.title = title
|
||||
|
||||
} else {
|
||||
// Fallback on earlier versions
|
||||
navigationController?.navigationBar.barTintColor = backgoundColor
|
||||
navigationController?.navigationBar.tintColor = tintColor
|
||||
navigationController?.navigationBar.isTranslucent = false
|
||||
navigationItem.title = title
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension ViewController: UIGestureRecognizerDelegate {
|
||||
|
||||
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldBeRequiredToFailBy otherGestureRecognizer: UIGestureRecognizer) -> Bool {
|
||||
|
||||
|
After Width: | Height: | Size: 509 KiB |
@@ -58,28 +58,28 @@
|
||||
13296F8F89440216D156B1EF58BBD3FA /* Pods-ContainerControllerSwift_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ContainerControllerSwift_Example-acknowledgements.markdown"; sourceTree = "<group>"; };
|
||||
148A1CC4CCA9A45E6679C0483EC257F1 /* Pods_ContainerControllerSwift_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ContainerControllerSwift_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
17B800897A944FAFD0416DC3C8A2B9CD /* ContainerControllerSwift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ContainerControllerSwift.debug.xcconfig; sourceTree = "<group>"; };
|
||||
23B6CA2F0075DF1F0D43741B3188D49C /* ContainerControllerSwift.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; path = ContainerControllerSwift.podspec; sourceTree = "<group>"; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
|
||||
23B6CA2F0075DF1F0D43741B3188D49C /* ContainerControllerSwift.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; path = ContainerControllerSwift.podspec; sourceTree = "<group>"; tabWidth = 2; };
|
||||
31C6D8CE52D9D44CFE3381837377CCE7 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
|
||||
3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
|
||||
32E7EA3D3C16ECD90748D85102DE9F48 /* Pods-ContainerControllerSwift_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-ContainerControllerSwift_Tests-umbrella.h"; sourceTree = "<group>"; };
|
||||
34B99A079CA33F3CFA10293C249BD2CE /* Pods-ContainerControllerSwift_Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ContainerControllerSwift_Example-Info.plist"; sourceTree = "<group>"; };
|
||||
3F0346DDED41D0AB543AE2537D7539D6 /* ContainerControllerSwift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ContainerControllerSwift-Info.plist"; sourceTree = "<group>"; };
|
||||
46ACEFB1249021C900FAAD43 /* ContainerTypes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerTypes.swift; path = ContainerControllerSwift/ContainerTypes.swift; sourceTree = "<group>"; };
|
||||
46ACEFB1249021C900FAAD43 /* ContainerTypes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerTypes.swift; path = Sources/ContainerController/ContainerTypes.swift; sourceTree = "<group>"; };
|
||||
46ACEFB3249021C900FAAD43 /* TableAdapterCellData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableAdapterCellData.swift; sourceTree = "<group>"; };
|
||||
46ACEFB4249021C900FAAD43 /* TableAdapterItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableAdapterItem.swift; sourceTree = "<group>"; };
|
||||
46ACEFB5249021C900FAAD43 /* TableAdapterCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableAdapterCell.swift; sourceTree = "<group>"; };
|
||||
46ACEFB6249021C900FAAD43 /* TableAdapterView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableAdapterView.swift; sourceTree = "<group>"; };
|
||||
46ACEFB7249021C900FAAD43 /* TableAdapterTypes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableAdapterTypes.swift; sourceTree = "<group>"; };
|
||||
46ACEFB8249021CA00FAAD43 /* ContainerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerView.swift; path = ContainerControllerSwift/ContainerView.swift; sourceTree = "<group>"; };
|
||||
46ACEFB9249021CA00FAAD43 /* ContainerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerController.swift; path = ContainerControllerSwift/ContainerController.swift; sourceTree = "<group>"; };
|
||||
46ACEFBA249021CA00FAAD43 /* ContainerLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerLayout.swift; path = ContainerControllerSwift/ContainerLayout.swift; sourceTree = "<group>"; };
|
||||
46ACEFB8249021CA00FAAD43 /* ContainerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerView.swift; path = Sources/ContainerController/ContainerView.swift; sourceTree = "<group>"; };
|
||||
46ACEFB9249021CA00FAAD43 /* ContainerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerController.swift; path = Sources/ContainerController/ContainerController.swift; sourceTree = "<group>"; };
|
||||
46ACEFBA249021CA00FAAD43 /* ContainerLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerLayout.swift; path = Sources/ContainerController/ContainerLayout.swift; sourceTree = "<group>"; };
|
||||
46ACEFBC249021CA00FAAD43 /* CollectionAdapterItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionAdapterItem.swift; sourceTree = "<group>"; };
|
||||
46ACEFBD249021CA00FAAD43 /* CollectionAdapterCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionAdapterCell.swift; sourceTree = "<group>"; };
|
||||
46ACEFBE249021CA00FAAD43 /* CollectionAdapterView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionAdapterView.swift; sourceTree = "<group>"; };
|
||||
46ACEFBF249021CA00FAAD43 /* CollectionAdapterCellData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionAdapterCellData.swift; sourceTree = "<group>"; };
|
||||
46ACEFC0249021CA00FAAD43 /* CollectionAdapterTypes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionAdapterTypes.swift; sourceTree = "<group>"; };
|
||||
46ACEFC1249021CA00FAAD43 /* ContainerControllerDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerControllerDelegate.swift; path = ContainerControllerSwift/ContainerControllerDelegate.swift; sourceTree = "<group>"; };
|
||||
46ACEFC2249021CA00FAAD43 /* ContainerDevice.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerDevice.swift; path = ContainerControllerSwift/ContainerDevice.swift; sourceTree = "<group>"; };
|
||||
46ACEFC1249021CA00FAAD43 /* ContainerControllerDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerControllerDelegate.swift; path = Sources/ContainerController/ContainerControllerDelegate.swift; sourceTree = "<group>"; };
|
||||
46ACEFC2249021CA00FAAD43 /* ContainerDevice.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerDevice.swift; path = Sources/ContainerController/ContainerDevice.swift; sourceTree = "<group>"; };
|
||||
4EEA0EC0D79861379FB2B1874207A67A /* ContainerControllerSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ContainerControllerSwift-dummy.m"; sourceTree = "<group>"; };
|
||||
4FAEEAC4BEF190DBB2A8F50DB74A5DC4 /* Pods-ContainerControllerSwift_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ContainerControllerSwift_Example-frameworks.sh"; sourceTree = "<group>"; };
|
||||
82F3FE4320C7E1306E9D6353343C0247 /* ContainerControllerSwift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ContainerControllerSwift.release.xcconfig; sourceTree = "<group>"; };
|
||||
@@ -87,7 +87,7 @@
|
||||
89922BFA2A740F6B35D8B7F42EC3C4A6 /* Pods-ContainerControllerSwift_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ContainerControllerSwift_Example.release.xcconfig"; sourceTree = "<group>"; };
|
||||
9539933A3B21B34CCDEC71F036AEAE32 /* Pods-ContainerControllerSwift_Tests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ContainerControllerSwift_Tests-Info.plist"; sourceTree = "<group>"; };
|
||||
9CE04B24AA978789CDFAA23C3FF9D294 /* Pods-ContainerControllerSwift_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ContainerControllerSwift_Tests-dummy.m"; sourceTree = "<group>"; };
|
||||
9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
|
||||
9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; };
|
||||
A44F5E78625C75314837F442526B9F1F /* Pods-ContainerControllerSwift_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ContainerControllerSwift_Tests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
C0064E8B7E1FC56F5599EFD271C67594 /* ContainerControllerSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = ContainerControllerSwift.modulemap; sourceTree = "<group>"; };
|
||||
C492E15579178E6EFA4F7D5E4FD837E3 /* Pods-ContainerControllerSwift_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ContainerControllerSwift_Example-dummy.m"; sourceTree = "<group>"; };
|
||||
@@ -156,7 +156,7 @@
|
||||
46ACEFB7249021C900FAAD43 /* TableAdapterTypes.swift */,
|
||||
);
|
||||
name = ContainerTable;
|
||||
path = ContainerControllerSwift/ContainerTable;
|
||||
path = Sources/ContainerController/ContainerTable;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
46ACEFBB249021CA00FAAD43 /* ContainerCollection */ = {
|
||||
@@ -169,7 +169,7 @@
|
||||
46ACEFC0249021CA00FAAD43 /* CollectionAdapterTypes.swift */,
|
||||
);
|
||||
name = ContainerCollection;
|
||||
path = ContainerControllerSwift/ContainerCollection;
|
||||
path = Sources/ContainerController/ContainerCollection;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
60BF066757F56B86BB1CBE3EBB71A70A /* Support Files */ = {
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
import XCTest
|
||||
import ContainerControllerSwift
|
||||
|
||||
class Tests: XCTestCase {
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
func testExample() {
|
||||
// This is an example of a functional test case.
|
||||
XCTAssert(true, "Pass")
|
||||
}
|
||||
|
||||
func testPerformanceExample() {
|
||||
// This is an example of a performance test case.
|
||||
self.measure() {
|
||||
// Put the code you want to measure the time of here.
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
// swift-tools-version:5.2
|
||||
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "ContainerController",
|
||||
platforms: [
|
||||
.iOS(.v13),
|
||||
],
|
||||
products: [
|
||||
// Products define the executables and libraries produced by a package, and make them visible to other packages.
|
||||
.library(
|
||||
name: "ContainerController",
|
||||
targets: ["ContainerController"]),
|
||||
],
|
||||
dependencies: [
|
||||
// Dependencies declare other packages that this package depends on.
|
||||
// .package(url: /* package url */, from: "1.0.0"),
|
||||
],
|
||||
targets: [
|
||||
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
|
||||
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
|
||||
.target(
|
||||
name: "ContainerController",
|
||||
dependencies: []),
|
||||
.testTarget(
|
||||
name: "ContainerControllerTests",
|
||||
dependencies: ["ContainerController"]),
|
||||
]
|
||||
)
|
||||
@@ -1,43 +1,64 @@
|
||||
[](https://travis-ci.org/github/mrustaa/ContainerController)
|
||||

|
||||
|
||||
# ContainerController
|
||||
|
||||
[](https://cocoapods.org/pods/ContainerControllerSwift)
|
||||
[](https://cocoapods.org/pods/ContainerControllerSwift)
|
||||
[](https://cocoapods.org/pods/ContainerControllerSwift)
|
||||
[](https://swift.org/)
|
||||
[](https://swift.org/)
|
||||
[](https://swift.org/)
|
||||
|
||||
# ContainerController
|
||||
UI Component. This is a copy swipe-panel from app: https://www.apple.com/ios/maps/
|
||||
|
||||
This is a swipe-panel from application: https://www.apple.com/ios/maps/
|
||||
## Preview
|
||||

|
||||

|
||||

|
||||
|
||||
<!-- TOC -->
|
||||
|
||||
- [Requirements](#requirements)
|
||||
- [Installation](#installation)
|
||||
- [CocoaPods](#cocoapods)
|
||||
- [Swift Package Manager with Xcode 11](#swift-package-manager-with-xcode-11)
|
||||
- [Getting Started](#getting-started)
|
||||
- [Delegate ScrollView to self](#delegate-scrollview-to-self)
|
||||
- [Action](#action)
|
||||
- [Move position with an animation](#move-position-with-an-animation)
|
||||
- [Adding custom views in ContainerController](#adding-custom-views-in-containercontroller)
|
||||
- [Add `ScrollView`](#add-scrollview)
|
||||
- [Adding possible custom subviews in ContainerController view](#adding-possible-custom-subviews-in-containercontroller-view)
|
||||
- [Add `ScrollView`📃](#add-scrollview)
|
||||
- [`Delegate` to self 👆](#delegate-to-self-)
|
||||
- [Add `HeaderView`](#add-headerview)
|
||||
- [Add `FooterView`](#add-footerview)
|
||||
- [Settings](#settings)
|
||||
- [Add Custom `View`](#add-custom-view)
|
||||
- [Settings ⚙️](#settings-)
|
||||
- [Layout](#layout)
|
||||
- [Customize the layout with create subclass ContainerLayout on initialization](#customize-the-layout-with-create-subclass-containerlayout-on-initialization)
|
||||
- [Or create object ContainerLayout](#or-create-object-containerlayout)
|
||||
- [Customize the layout with create subclass `ContainerLayout` on initialization](#customize-the-layout-with-create-subclass-containerlayout-on-initialization)
|
||||
- [Or create object `ContainerLayout`](#or-create-object-containerlayout)
|
||||
- [Change settings right away](#change-settings-right-away)
|
||||
- [ContainerView](#containerview)
|
||||
- [ContainerController `View`](#containercontroller-view)
|
||||
- [Use a ready-made solution](#use-a-ready-made-solution)
|
||||
- [Add your changes](#add-your-changes)
|
||||
- [Change `CornerRadius`](#change-cornerradius)
|
||||
- [Add Layer `Shadow`](#add-layer-shadow)
|
||||
- [Add Background `Blur`](#add-background-blur)
|
||||
- [More details](#more-details)
|
||||
- [Change positions on screen Top Middle Bottom](#change-positions-on-screen-top-middle-bottom)
|
||||
- [Customize indentations for View](#customize-indentations-for-view)
|
||||
- [Customize for landscape orientation](#customize-for-landscape-orientation)
|
||||
- [Parameters for control footerView](#parameters-for-control-footerview)
|
||||
- [ContainerControllerDelegate](#containercontrollerdelegate)
|
||||
- [ContainerController `Delegate`](#containercontroller-delegate)
|
||||
- [Author](#author)
|
||||
- [License](#license)
|
||||
|
||||
<!-- /TOC -->
|
||||
|
||||
## Installation CocoaPods
|
||||
## Requirements
|
||||
|
||||
✏️ ContainerController is written in Swift 5.0+. It can be built by Xcode 11 or later. Compatible with iOS 13.0+.
|
||||
|
||||
## Installation
|
||||
|
||||
### CocoaPods
|
||||
|
||||
ContainerControllerSwift is available through [CocoaPods](https://cocoapods.org). To install
|
||||
it, simply add the following line to your Podfile:
|
||||
@@ -45,11 +66,16 @@ it, simply add the following line to your Podfile:
|
||||
```ruby
|
||||
pod 'ContainerControllerSwift'
|
||||
```
|
||||
### Swift Package Manager with Xcode 11
|
||||
|
||||
Follow [this doc](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app).
|
||||
|
||||
## Getting Started
|
||||
|
||||
```swift
|
||||
|
||||
import UIKit
|
||||
import ContainerControllerSwift
|
||||
|
||||
class ViewController: UIViewController, ContainerControllerDelegate {
|
||||
|
||||
@@ -66,7 +92,7 @@ class ViewController: UIViewController, ContainerControllerDelegate {
|
||||
|
||||
// Create ContainerController object, along with the container.view
|
||||
// Pass the current UIViewController
|
||||
container = ContainerController(addTo: self, layout: layout)
|
||||
let container = ContainerController(addTo: self, layout: layout)
|
||||
container.view.cornerRadius = 15
|
||||
container.view.addShadow()
|
||||
|
||||
@@ -94,8 +120,39 @@ class ViewController: UIViewController, ContainerControllerDelegate {
|
||||
}
|
||||
```
|
||||
|
||||
## Delegate ScrollView to self
|
||||
#### ☝️ If you implement delegate ScrollView (TableView, CollectionView, TextView) to `self`, then you need to call 4 functions in ContainerController
|
||||
## Action
|
||||
|
||||
### Move position with an animation
|
||||
|
||||
```swift
|
||||
|
||||
container.move(type: .top)
|
||||
container.move(type: .middle)
|
||||
container.move(type: .bottom)
|
||||
|
||||
```
|
||||
|
||||
## Adding possible custom subviews in ContainerController view
|
||||
|
||||
### Add `ScrollView`
|
||||
|
||||
```swift
|
||||
|
||||
let tableView = UITableView()
|
||||
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "cell")
|
||||
tableView.backgroundColor = .clear
|
||||
tableView.tableFooterView = UIView()
|
||||
tableView.delegate = self
|
||||
tableView.dataSource = self
|
||||
|
||||
// Add scrollView to container
|
||||
container.add(scrollView: tableView)
|
||||
|
||||
```
|
||||
|
||||
|
||||
#### `Delegate` to self 👆
|
||||
#### If you implement delegate ScrollView (TableView, CollectionView, TextView) to `self`, then you need to call 4 functions in ContainerController
|
||||
|
||||
```swift
|
||||
extension ViewController: UIScrollViewDelegate {
|
||||
@@ -127,36 +184,6 @@ extension ViewController: UITableViewDataSource {
|
||||
|
||||
```
|
||||
|
||||
## Action
|
||||
|
||||
### Move position with an animation
|
||||
|
||||
```swift
|
||||
|
||||
container.move(type: .top)
|
||||
container.move(type: .middle)
|
||||
container.move(type: .bottom)
|
||||
|
||||
```
|
||||
|
||||
## Adding custom views in ContainerController
|
||||
|
||||
### Add `ScrollView`
|
||||
|
||||
```swift
|
||||
|
||||
let tableView = UITableView()
|
||||
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "cell")
|
||||
tableView.backgroundColor = .clear
|
||||
tableView.tableFooterView = UIView()
|
||||
tableView.delegate = self
|
||||
tableView.dataSource = self
|
||||
|
||||
// Add scrollView to container
|
||||
container.add(scrollView: tableView)
|
||||
|
||||
```
|
||||
|
||||
### Add `HeaderView`
|
||||
|
||||
```swift
|
||||
@@ -178,8 +205,30 @@ tabBarView.height = 49.0
|
||||
container.add(footerView: tabBarView)
|
||||
|
||||
```
|
||||
### Add Custom `View`
|
||||
|
||||
## Settings
|
||||
```swift
|
||||
|
||||
// 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)
|
||||
|
||||
```
|
||||
|
||||
## Settings ⚙️
|
||||
|
||||
### Layout
|
||||
|
||||
@@ -281,45 +330,29 @@ container.setLandscape(right: 100)
|
||||
|
||||
```
|
||||
|
||||
## ContainerView
|
||||
## ContainerController `View`
|
||||
|
||||
ContainerView is generated automatically when you create ContainerController
|
||||
#### Use a ready-made solution
|
||||
|
||||
`ContainerView` is generated automatically when you create ContainerController
|
||||
Use a ready-made solution to change the radius, add shadow, and blur.
|
||||
|
||||
### Use a ready-made solution
|
||||
#### Change `CornerRadius`
|
||||
|
||||
```swift
|
||||
|
||||
// Change cornerRadius global for all subviews
|
||||
container.view.cornerRadius = 15
|
||||
|
||||
// Add layer shadow
|
||||
container.view.addShadow(opacity: 0.1)
|
||||
|
||||
// Add background blur UIVisualEffectView
|
||||
container.view.addBlur(style: .dark)
|
||||
|
||||
```
|
||||
#### Add your changes
|
||||
#### Add Layer `Shadow`
|
||||
|
||||
```swift
|
||||
container.view.addShadow(opacity: 0.1)
|
||||
```
|
||||
#### Add Background `Blur`
|
||||
|
||||
// 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)
|
||||
```swift
|
||||
// add blur UIVisualEffectView
|
||||
container.view.addBlur(style: .dark)
|
||||
|
||||
```
|
||||
|
||||
@@ -403,7 +436,10 @@ container.set(trackingPosition: false)
|
||||
|
||||
```
|
||||
|
||||
## ContainerControllerDelegate
|
||||

|
||||

|
||||
|
||||
## ContainerController `Delegate`
|
||||
|
||||
```swift
|
||||
|
||||
@@ -434,6 +470,10 @@ func containerControllerMove(_ containerController: ContainerController, positio
|
||||
|
||||
```
|
||||
|
||||
## Author
|
||||
|
||||
<motionrustam@gmail.com> 📩| [mrustaa](https://github.com/mrustaa/) JUNE 2020
|
||||
|
||||
## License
|
||||
|
||||
ContainerController is available under the MIT license. See the LICENSE file for more info.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//
|
||||
// ColletionAdapterCell.swift
|
||||
// CollectionAdapterCell.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by Рустам Мотыгуллин on 01/05/2020.
|
||||
// Copyright © 2020 mrusta. All rights reserved.
|
||||
// Created by mrustaa on 01/05/2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
@@ -1,9 +1,9 @@
|
||||
//
|
||||
// ColletionAdapterCellData.swift
|
||||
// CollectionAdapterCellData.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by Рустам Мотыгуллин on 01/05/2020.
|
||||
// Copyright © 2020 mrusta. All rights reserved.
|
||||
// Created by mrustaa on 01/05/2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
@@ -1,9 +1,9 @@
|
||||
//
|
||||
// ColletionAdapterItem.swift
|
||||
// CollectionAdapterItem.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by Рустам Мотыгуллин on 01/05/2020.
|
||||
// Copyright © 2020 mrusta. All rights reserved.
|
||||
// Created by mrustaa on 01/05/2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
@@ -2,8 +2,8 @@
|
||||
// CollectionAdapterTypes.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by Рустам Мотыгуллин on 01/05/2020.
|
||||
// Copyright © 2020 mrusta. All rights reserved.
|
||||
// Created by mrustaa on 01/05/2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
@@ -2,8 +2,8 @@
|
||||
// CollectionAdapterView.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by Рустам Мотыгуллин on 01/05/2020.
|
||||
// Copyright © 2020 mrusta. All rights reserved.
|
||||
// Created by mrustaa on 01/05/2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// ContainerView.swift
|
||||
// ContainerController.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by mrustaa on 21/04/2020.
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
open class ContainerController: NSObject {
|
||||
|
||||
// MARK: Views
|
||||
@@ -210,20 +211,12 @@ open class ContainerController: NSObject {
|
||||
|
||||
@objc func rotated() {
|
||||
|
||||
let orint = UIDevice.current.orientation
|
||||
if orint == .faceUp || orint == .faceDown { return }
|
||||
if !UIDevice.current.orientation.isRotateAllowed { return }
|
||||
|
||||
if ContainerDevice.orientation == oldOrientation { return }
|
||||
oldOrientation = ContainerDevice.orientation
|
||||
|
||||
if isPortrait {
|
||||
shadowButton.isHidden = !layout.backgroundShadowShow
|
||||
} else {
|
||||
if let landscapeShadowShow = layout.landscapeBackgroundShadowShow {
|
||||
shadowButton.isHidden = !landscapeShadowShow
|
||||
} else {
|
||||
shadowButton.isHidden = !layout.backgroundShadowShow
|
||||
}
|
||||
}
|
||||
shadowHiddenCheck()
|
||||
|
||||
delegate?.containerControllerRotation(self)
|
||||
|
||||
@@ -372,7 +365,7 @@ open class ContainerController: NSObject {
|
||||
private func createContainerView() {
|
||||
let frame = CGRect(x: 0, y: 0, width: deviceWidth, height: deviceHeight * 2)
|
||||
view = ContainerView(frame: frame)
|
||||
view.backgroundColor = .white
|
||||
view.backgroundColor = .systemBackground
|
||||
controller?.view.addSubview(view)
|
||||
|
||||
panGesture = UIPanGestureRecognizer(target: self, action: #selector(handlePan(_:)))
|
||||
@@ -870,7 +863,7 @@ open class ContainerController: NSObject {
|
||||
|
||||
}
|
||||
|
||||
func shadowLevelAlpha(positionY: CGFloat) {
|
||||
func shadowHiddenCheck() {
|
||||
|
||||
if isPortrait {
|
||||
shadowButton.isHidden = !layout.backgroundShadowShow
|
||||
@@ -881,6 +874,11 @@ open class ContainerController: NSObject {
|
||||
shadowButton.isHidden = !layout.backgroundShadowShow
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func shadowLevelAlpha(positionY: CGFloat) {
|
||||
|
||||
shadowHiddenCheck()
|
||||
|
||||
let alphaMax: CGFloat = 0.45
|
||||
|
||||
@@ -1092,6 +1090,7 @@ open class ContainerController: NSObject {
|
||||
|
||||
// MARK: - Gesture Delegate
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
extension ContainerController: UIGestureRecognizerDelegate {
|
||||
|
||||
public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
|
||||
@@ -1102,6 +1101,7 @@ extension ContainerController: UIGestureRecognizerDelegate {
|
||||
|
||||
// MARK: - Table Delegate
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
extension ContainerController: UITableViewDelegate {
|
||||
|
||||
public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
|
||||
@@ -1121,6 +1121,7 @@ extension ContainerController: UITableViewDelegate {
|
||||
|
||||
// MARK: - Table DataSource
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
extension ContainerController: UITableViewDataSource {
|
||||
|
||||
public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
@@ -1136,11 +1137,24 @@ extension ContainerController: UITableViewDataSource {
|
||||
}
|
||||
return UITableViewCell()
|
||||
}
|
||||
|
||||
|
||||
public func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
|
||||
if let tableAdapterView = scrollView as? TableAdapterView {
|
||||
return tableAdapterView.tableView(tableView, canEditRowAt: indexPath)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
public func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
|
||||
if let tableAdapterView = scrollView as? TableAdapterView {
|
||||
return tableAdapterView.tableView(tableView, commit: editingStyle, forRowAt: indexPath)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Collection Delegate
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
extension ContainerController: UICollectionViewDelegate {
|
||||
|
||||
public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
|
||||
@@ -1153,6 +1167,7 @@ extension ContainerController: UICollectionViewDelegate {
|
||||
|
||||
// MARK: - Collection DataSource
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
extension ContainerController: UICollectionViewDataSource {
|
||||
|
||||
public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||
@@ -1172,6 +1187,7 @@ extension ContainerController: UICollectionViewDataSource {
|
||||
|
||||
// MARK: - Collection DelegateFlowLayout
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
extension ContainerController: UICollectionViewDelegateFlowLayout {
|
||||
|
||||
public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
|
||||
@@ -1184,6 +1200,7 @@ extension ContainerController: UICollectionViewDelegateFlowLayout {
|
||||
|
||||
// MARK: - Scroll Delegate
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
extension ContainerController: UIScrollViewDelegate {
|
||||
|
||||
public func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// ContainerView.swift
|
||||
// ContainerControllerDelegate.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by mrustaa on 21/04/2020.
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
public protocol ContainerControllerDelegate {
|
||||
|
||||
/// Reports rotation and orientation changes
|
||||
@@ -21,6 +22,7 @@ public protocol ContainerControllerDelegate {
|
||||
|
||||
}
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
public extension ContainerControllerDelegate {
|
||||
|
||||
func containerControllerRotation(_ containerController: ContainerController) {
|
||||
@@ -1,9 +1,15 @@
|
||||
|
||||
//
|
||||
// ContainerDevice.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by mrustaa on 21/04/2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
public extension ContainerDevice {
|
||||
|
||||
enum Orientation {
|
||||
case portrait
|
||||
case landscapeLeft
|
||||
@@ -11,6 +17,7 @@ public extension ContainerDevice {
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
open class ContainerDevice {
|
||||
|
||||
// MARK: - Size
|
||||
@@ -56,12 +63,8 @@ open class ContainerDevice {
|
||||
|
||||
class public var statusBarHeight: CGFloat {
|
||||
var height: CGFloat = 0
|
||||
if #available(iOS 13.0, *) {
|
||||
let window = UIApplication.shared.windows.filter {$0.isKeyWindow}.first
|
||||
height = window?.windowScene?.statusBarManager?.statusBarFrame.height ?? 0
|
||||
} else {
|
||||
height = UIApplication.shared.statusBarFrame.height
|
||||
}
|
||||
let window = UIApplication.shared.windows.filter {$0.isKeyWindow}.first
|
||||
height = window?.windowScene?.statusBarManager?.statusBarFrame.height ?? 0
|
||||
return height
|
||||
}
|
||||
|
||||
@@ -81,7 +84,7 @@ open class ContainerDevice {
|
||||
switch UIDevice.current.orientation {
|
||||
case .landscapeLeft, .landscapeRight:
|
||||
portrait = false
|
||||
case .portrait, .portraitUpsideDown:
|
||||
case .portrait:
|
||||
portrait = true
|
||||
default: break
|
||||
}
|
||||
@@ -116,6 +119,18 @@ open class ContainerDevice {
|
||||
return .landscapeLeft
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public extension UIDeviceOrientation {
|
||||
|
||||
var isRotateAllowed: Bool {
|
||||
return !(face || self == .portraitUpsideDown)
|
||||
}
|
||||
|
||||
var face: Bool {
|
||||
switch self {
|
||||
case .faceUp, .faceDown: return true
|
||||
default: return false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// ContainerView.swift
|
||||
// ContainerLayout.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by mrustaa on 21/04/2020.
|
||||
@@ -2,8 +2,8 @@
|
||||
// TableAdapterCell.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by Рустам Мотыгуллин on 17/04/2020.
|
||||
// Copyright © 2020 mrusta. All rights reserved.
|
||||
// Created by mrustaa on 17/04/2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// TableAdapterCellData.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by mrustaa on 17/04/2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class TableAdapterCellData: NSObject {
|
||||
|
||||
open func cellHeight() -> CGFloat {
|
||||
return UITableView.automaticDimension
|
||||
}
|
||||
|
||||
open func canEditing() -> Bool {
|
||||
return false
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,8 +2,8 @@
|
||||
// TableAdapterItem.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by Рустам Мотыгуллин on 17/04/2020.
|
||||
// Copyright © 2020 mrusta. All rights reserved.
|
||||
// Created by mrustaa on 17/04/2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
@@ -27,7 +27,7 @@ open class TableAdapterItem: NSObject {
|
||||
return cellData?.cellHeight() ?? UITableView.automaticDimension
|
||||
}
|
||||
|
||||
func canEditing() -> Bool {
|
||||
public func canEditing() -> Bool {
|
||||
return cellData?.canEditing() ?? false
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//
|
||||
// ContainerTypes.swift
|
||||
// TableAdapterTypes.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by Рустам Мотыгуллин on 21/04/2020.
|
||||
// Copyright © 2020 mrusta. All rights reserved.
|
||||
// Created by mrustaa on 21/04/2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
@@ -1,9 +1,9 @@
|
||||
//
|
||||
// BlockTableView.swift
|
||||
// TableAdapterView.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by Рустам Мотыгуллин on 16/04/2020.
|
||||
// Copyright © 2020 mrusta. All rights reserved.
|
||||
// Created by mrustaa on 16/04/2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
@@ -96,7 +96,7 @@ open class TableAdapterView: UITableView {
|
||||
|
||||
extension TableAdapterView: UITableViewDataSource {
|
||||
|
||||
/// колличество
|
||||
/// count
|
||||
public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
if !items.isEmpty {
|
||||
return items.count
|
||||
@@ -107,7 +107,7 @@ extension TableAdapterView: UITableViewDataSource {
|
||||
return 0
|
||||
}
|
||||
|
||||
/// ячейка
|
||||
/// cell
|
||||
public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
if !items.isEmpty {
|
||||
let item = items[indexPath.row]
|
||||
@@ -147,7 +147,7 @@ extension TableAdapterView: UITableViewDataSource {
|
||||
|
||||
extension TableAdapterView: UITableViewDelegate {
|
||||
|
||||
/// высота
|
||||
/// height
|
||||
public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
|
||||
if !items.isEmpty {
|
||||
return items[indexPath.row].height()
|
||||
@@ -158,7 +158,7 @@ extension TableAdapterView: UITableViewDelegate {
|
||||
return 0
|
||||
}
|
||||
|
||||
/// нажал
|
||||
/// select
|
||||
public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
tableView.deselectRow(at: indexPath, animated: true)
|
||||
selectIndexCallback?(indexPath.row)
|
||||
@@ -6,6 +6,8 @@
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
typealias ContainerCompletion = () -> Void
|
||||
|
||||
public enum ContainerMoveType {
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
open class ContainerView: UIView {
|
||||
|
||||
public var contentView: UIView?
|
||||
@@ -0,0 +1,15 @@
|
||||
import XCTest
|
||||
@testable import ContainerController
|
||||
|
||||
final class ContainerControllerTests: XCTestCase {
|
||||
func testExample() {
|
||||
// This is an example of a functional test case.
|
||||
// Use XCTAssert and related functions to verify your tests produce the correct
|
||||
// results.
|
||||
// XCTAssertEqual(ContainerController().text, "Hello, World!")
|
||||
}
|
||||
|
||||
static var allTests = [
|
||||
("testExample", testExample),
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import XCTest
|
||||
|
||||
#if !canImport(ObjectiveC)
|
||||
public func allTests() -> [XCTestCaseEntry] {
|
||||
return [
|
||||
testCase(ContainerControllerTests.allTests),
|
||||
]
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,7 @@
|
||||
import XCTest
|
||||
|
||||
import ContainerControllerTests
|
||||
|
||||
var tests = [XCTestCaseEntry]()
|
||||
tests += ContainerControllerTests.allTests()
|
||||
XCTMain(tests)
|
||||
@@ -1 +0,0 @@
|
||||
Example/Pods/Pods.xcodeproj
|
||||