Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a59bacaf89 | |||
| ab373c569a | |||
| 29c7b63352 | |||
| 45a2479733 | |||
| 36ec1c3d12 | |||
| 59832f0e4b | |||
| f77b041bce | |||
| 07ddae83a0 | |||
| 7ae64d9350 | |||
| 51b9c84daa | |||
| 211dcf48a6 | |||
| e3ae3d440e | |||
| 87b208dc1b | |||
| 9449d4d9d6 | |||
| 5249c14314 | |||
| f95ba4f1e4 | |||
| ad9dfd7f5a | |||
| 6d7e1a010b | |||
| 262727193c | |||
| a17e142cfa | |||
| 99591d784f | |||
| c4ff71566c | |||
| 1418eeda0f |
@@ -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.9'
|
||||
s.version = '1.1.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.
|
||||
|
||||
@@ -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
|
||||
@@ -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,6 +100,12 @@
|
||||
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 */; };
|
||||
@@ -115,8 +119,6 @@
|
||||
0AA8BF39B9F182FE833C0178 /* Pods-ContainerControllerSwift_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ContainerControllerSwift_Example.debug.xcconfig"; path = "Target Support Files/Pods-ContainerControllerSwift_Example/Pods-ContainerControllerSwift_Example.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
1034FE614CC8890CE063531F /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
|
||||
121FB933CAE3EC5A2A00F4B2 /* Pods_ContainerControllerSwift_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ContainerControllerSwift_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
46ACEFD42490F52500FAAD43 /* ExamplesAddTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExamplesAddTableViewController.swift; sourceTree = "<group>"; };
|
||||
46ACEFD52490F52500FAAD43 /* ExamplesAddTableViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = ExamplesAddTableViewController.storyboard; sourceTree = "<group>"; };
|
||||
46ACEFD82490F52500FAAD43 /* Color.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Color.swift; sourceTree = "<group>"; };
|
||||
46ACEFD92490F52500FAAD43 /* UIView+Positioning.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Positioning.swift"; sourceTree = "<group>"; };
|
||||
46ACEFDC2490F52500FAAD43 /* StoryboardController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoryboardController.swift; sourceTree = "<group>"; };
|
||||
@@ -212,7 +214,13 @@
|
||||
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>"; };
|
||||
@@ -220,7 +228,7 @@
|
||||
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>"; };
|
||||
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>"; };
|
||||
@@ -252,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>";
|
||||
@@ -278,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 */ = {
|
||||
@@ -858,11 +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 */,
|
||||
607FACF51AFB993E008FA782 /* Podspec */,
|
||||
607FACD21AFB9204008FA782 /* Example */,
|
||||
607FACD11AFB9204008FA782 /* Products */,
|
||||
22F538CF8601A849D034CF8B /* Pods */,
|
||||
AD5BB6CA5AB2437952B3E0A8 /* Frameworks */,
|
||||
@@ -872,47 +874,49 @@
|
||||
607FACD11AFB9204008FA782 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
607FACD01AFB9204008FA782 /* ContainerControllerSwift_Example.app */,
|
||||
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>";
|
||||
};
|
||||
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 */ = {
|
||||
@@ -943,7 +947,7 @@
|
||||
);
|
||||
name = ContainerControllerSwift_Example;
|
||||
productName = ContainerControllerSwift;
|
||||
productReference = 607FACD01AFB9204008FA782 /* ContainerControllerSwift_Example.app */;
|
||||
productReference = 607FACD01AFB9204008FA782 /* ContainerController.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
@@ -1007,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 */,
|
||||
@@ -1080,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 */,
|
||||
@@ -1103,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 */,
|
||||
@@ -1132,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 */,
|
||||
@@ -1299,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;
|
||||
};
|
||||
@@ -1315,8 +1323,8 @@
|
||||
INFOPLIST_FILE = ContainerControllerSwift/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MODULE_NAME = ExampleApp;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = mrusta.ContainerController;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = mrustaa.ContainerController;
|
||||
PRODUCT_NAME = ContainerController;
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
|
||||
+4
-4
@@ -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>
|
||||
|
||||
@@ -38,10 +38,10 @@
|
||||
</objects>
|
||||
<point key="canvasLocation" x="132" y="137.18140929535232"/>
|
||||
</scene>
|
||||
<!--Light Content Navigation Controller-->
|
||||
<!--Navigation Controller-->
|
||||
<scene sceneID="2WA-6t-2aK">
|
||||
<objects>
|
||||
<navigationController id="aV9-EX-QWJ" customClass="LightContentNavigationController" customModule="ContainerControllerSwift_Example" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<navigationController id="aV9-EX-QWJ" sceneMemberID="viewController">
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" translucent="NO" id="QWK-gZ-mYK">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
|
||||
+2
-2
@@ -7,10 +7,10 @@
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Examples Add Table View Controller-->
|
||||
<!--Example Add Collection View Controller-->
|
||||
<scene sceneID="0f9-5i-ygC">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="ExamplesAddTableViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="p3c-kf-PfN" customClass="ExamplesAddTableViewController" customModule="ContainerControllerSwift_Example" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<viewController storyboardIdentifier="ExampleAddCollectionViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="p3c-kf-PfN" customClass="ExampleAddCollectionViewController" customModule="ContainerController" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="jmi-Lo-St4">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
//
|
||||
// ExampleAddCollectionViewController.swift
|
||||
// ContainerControllerSwift
|
||||
//
|
||||
// Created by mrustaa on 09.06.2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import ContainerControllerSwift
|
||||
|
||||
class ExampleAddCollectionViewController: StoryboardController {
|
||||
|
||||
var container: ContainerController!
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
|
||||
let layoutC = ContainerLayout()
|
||||
layoutC.positions = ContainerPosition(top: 100, middle: 250, bottom: 70)
|
||||
container = ContainerController(addTo: self, layout: layoutC)
|
||||
container.view.cornerRadius = 15
|
||||
container.view.addShadow()
|
||||
container.add(scrollView: addCollectionView())
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
container.move(type: .middle)
|
||||
}
|
||||
|
||||
func addCollectionView() -> UICollectionView {
|
||||
|
||||
let layout = UICollectionViewFlowLayout()
|
||||
|
||||
let padding: CGFloat = 15
|
||||
layout.sectionInset = UIEdgeInsets(top: padding, left: padding, bottom: padding, right: padding)
|
||||
layout.minimumLineSpacing = padding
|
||||
layout.minimumInteritemSpacing = padding
|
||||
|
||||
let colletion = UICollectionView(frame: CGRect.zero, collectionViewLayout: layout)
|
||||
colletion.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "cell")
|
||||
colletion.backgroundColor = .clear
|
||||
colletion.delegate = self
|
||||
colletion.dataSource = self
|
||||
return colletion
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Scroll Delegate
|
||||
|
||||
extension ExampleAddCollectionViewController: UIScrollViewDelegate {
|
||||
|
||||
func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
||||
container.scrollViewDidScroll(scrollView)
|
||||
}
|
||||
|
||||
func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
|
||||
container.scrollViewWillBeginDragging(scrollView)
|
||||
}
|
||||
|
||||
func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
|
||||
container.scrollViewDidEndDecelerating(scrollView)
|
||||
}
|
||||
|
||||
func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
|
||||
container.scrollViewDidEndDragging(scrollView, willDecelerate: decelerate)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Collection DataSource
|
||||
|
||||
extension ExampleAddCollectionViewController: UICollectionViewDataSource {
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||
return 17
|
||||
}
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath)
|
||||
|
||||
let randomInt = Int.random(in: 0..<6)
|
||||
|
||||
var color: UIColor = .systemBlue
|
||||
|
||||
switch randomInt {
|
||||
case 0: color = .systemBlue
|
||||
case 1: color = .systemRed
|
||||
case 2: color = .systemGray
|
||||
case 3: color = .systemGreen
|
||||
case 4: color = .systemYellow
|
||||
case 5: color = .systemOrange
|
||||
default: break
|
||||
}
|
||||
|
||||
cell.backgroundColor = color
|
||||
cell.layer.cornerRadius = 12
|
||||
return cell
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Collection Layout
|
||||
|
||||
extension ExampleAddCollectionViewController: UICollectionViewDelegateFlowLayout {
|
||||
|
||||
public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
|
||||
let size = ((ContainerDevice.width / 2) - 1) - 22
|
||||
return CGSize(width: size, height: size)
|
||||
}
|
||||
}
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Example Add Table View Controller-->
|
||||
<scene sceneID="0f9-5i-ygC">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="ExampleAddTableViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="p3c-kf-PfN" customClass="ExampleAddTableViewController" customModule="ContainerController" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="jmi-Lo-St4">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<viewLayoutGuide key="safeArea" id="QCP-uk-H24"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Uzt-sR-4xA" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="781.15942028985512" y="43.526785714285715"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
//
|
||||
// ExampleAddTableViewController.swift
|
||||
// ContainerControllerSwift
|
||||
//
|
||||
// Created by mrustaa on 09.06.2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import ContainerControllerSwift
|
||||
|
||||
class ExampleAddTableViewController: StoryboardController {
|
||||
|
||||
var container: ContainerController!
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
let layout = ContainerLayout()
|
||||
layout.backgroundShadowShow = true
|
||||
layout.positions = ContainerPosition(top: 70, middle: 250, bottom: 100)
|
||||
container = ContainerController(addTo: self, layout: layout)
|
||||
container.view.cornerRadius = 15
|
||||
container.view.addShadow()
|
||||
container.add(scrollView: addTableView())
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
container.move(type: .top)
|
||||
}
|
||||
|
||||
func addTableView() -> UITableView {
|
||||
|
||||
let tableView = UITableView()
|
||||
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "cell")
|
||||
tableView.delegate = self
|
||||
tableView.dataSource = self
|
||||
return tableView
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: - Scroll Delegate
|
||||
|
||||
extension ExampleAddTableViewController: UIScrollViewDelegate {
|
||||
|
||||
func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
||||
container.scrollViewDidScroll(scrollView)
|
||||
}
|
||||
|
||||
func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
|
||||
container.scrollViewWillBeginDragging(scrollView)
|
||||
}
|
||||
|
||||
func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
|
||||
container.scrollViewDidEndDecelerating(scrollView)
|
||||
}
|
||||
|
||||
func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
|
||||
container.scrollViewDidEndDragging(scrollView, willDecelerate: decelerate)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Table Delegate
|
||||
|
||||
extension ExampleAddTableViewController: UITableViewDelegate {
|
||||
|
||||
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
|
||||
return 60
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Table DataSource
|
||||
|
||||
extension ExampleAddTableViewController: UITableViewDataSource {
|
||||
|
||||
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
return 21
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
|
||||
cell.textLabel?.text = "item \(indexPath.row)"
|
||||
cell.backgroundColor = .clear
|
||||
return cell
|
||||
}
|
||||
}
|
||||
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
//
|
||||
// ExampleAddTableViewControllerSettings.swift
|
||||
// ContainerControllerSwift
|
||||
//
|
||||
// Created by mrustaa on 09.06.2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import ContainerControllerSwift
|
||||
|
||||
extension ExampleAddTableViewController {
|
||||
|
||||
// MARK: - Settings
|
||||
|
||||
func changeViewParametrs() {
|
||||
|
||||
container.view.cornerRadius = 15 // Change cornerRadius global
|
||||
container.view.addShadow(opacity: 0.1) // Add layer shadow
|
||||
container.view.addBlur(style: .dark) // Add background blur UIVisualEffectView
|
||||
}
|
||||
|
||||
func changeViewCustom() {
|
||||
|
||||
// Add custom shadow
|
||||
let layer = container.view.layer
|
||||
layer.shadowOpacity = 0.5
|
||||
layer.shadowColor = UIColor.red.cgColor
|
||||
layer.shadowOffset = CGSize(width: 1, height: 4)
|
||||
layer.shadowRadius = 5
|
||||
|
||||
// Add view in container.view
|
||||
let viewRed = UIView(frame: CGRect(x: 50, y: 50, width: 50, height: 50))
|
||||
viewRed.backgroundColor = .systemRed
|
||||
container.view.addSubview(viewRed)
|
||||
|
||||
// Add view under scrollView container.view
|
||||
let viewGreen = UIView(frame: CGRect(x: 25, y: 25, width: 50, height: 50))
|
||||
viewGreen.backgroundColor = .systemGreen
|
||||
container.view.insertSubview(viewGreen, at: 0)
|
||||
}
|
||||
|
||||
func createLayout() {
|
||||
|
||||
let layout = ContainerLayout()
|
||||
layout.startPosition = .hide
|
||||
layout.backgroundShadowShow = false
|
||||
layout.positions = ContainerPosition(top: 70, middle: 250, bottom: 70)
|
||||
|
||||
}
|
||||
|
||||
// MARK: - Change settings right away
|
||||
|
||||
func changeRightAway() {
|
||||
|
||||
// Properties
|
||||
container.set(movingEnabled: true)
|
||||
container.set(trackingPosition: false)
|
||||
container.set(footerPadding: 100)
|
||||
|
||||
// Add ScrollInsets Top/Bottom
|
||||
container.set(scrollIndicatorTop: 5) // ↓
|
||||
container.set(scrollIndicatorBottom: 5) // ↑
|
||||
|
||||
// Positions
|
||||
container.set(top: 70) // ↓
|
||||
container.set(middle: 250) // ↑
|
||||
container.set(bottom: 80) // ↑
|
||||
|
||||
// Middle Enable/Disable
|
||||
container.set(middle: 250)
|
||||
container.set(middle: nil)
|
||||
|
||||
// Background Shadow
|
||||
container.set(backgroundShadowShow: true)
|
||||
|
||||
// Insets View
|
||||
container.set(left: 5) // →
|
||||
container.set(right: 5) // ←
|
||||
|
||||
// Landscape params
|
||||
container.setLandscape(top: 30)
|
||||
container.setLandscape(middle: 150)
|
||||
container.setLandscape(bottom: 70)
|
||||
container.setLandscape(middle: nil)
|
||||
|
||||
container.setLandscape(backgroundShadowShow: false)
|
||||
|
||||
container.setLandscape(left: 10)
|
||||
container.setLandscape(right: 100)
|
||||
}
|
||||
}
|
||||
-273
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,10 +36,6 @@ class ExamplesSettingsViewController: StoryboardController {
|
||||
}
|
||||
}
|
||||
|
||||
// override var prefersStatusBarHidden: Bool {
|
||||
// return true
|
||||
// }
|
||||
|
||||
// MARK: - Load TableView
|
||||
|
||||
func loadTableView() {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -107,7 +107,7 @@ class MapViewManager: NSObject {
|
||||
}
|
||||
|
||||
|
||||
// MARK: - 🗺 Map Show Route
|
||||
// MARK: - Map Show Route
|
||||
|
||||
public func showRouteOnMapMyLocation() {
|
||||
if let pickupCoord = mapView?.userLocation.location?.coordinate,
|
||||
@@ -165,7 +165,7 @@ class MapViewManager: NSObject {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - ⚠️ Map-Delegate
|
||||
// MARK: - Map-Delegate
|
||||
|
||||
extension MapViewManager: MKMapViewDelegate {
|
||||
|
||||
@@ -209,7 +209,7 @@ extension MapViewManager: MKMapViewDelegate {
|
||||
|
||||
}
|
||||
|
||||
// MARK: - ⚠️ Update Location Delegate
|
||||
// MARK: - Update Location Delegate
|
||||
|
||||
extension MapViewManager: CLLocationManagerDelegate {
|
||||
|
||||
@@ -236,7 +236,7 @@ extension MapViewManager: CLLocationManagerDelegate {
|
||||
|
||||
}
|
||||
|
||||
// MARK: - 🗺 Map Extension
|
||||
// MARK: - Map Extension
|
||||
|
||||
extension MKCoordinateRegion {
|
||||
var mapRect: MKMapRect {
|
||||
|
||||
@@ -56,10 +56,6 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
startAnimationMapElements()
|
||||
}
|
||||
|
||||
// override var prefersStatusBarHidden: Bool {
|
||||
// return true
|
||||
// }
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
@@ -108,6 +104,10 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
// MARK: - Rotation Callback
|
||||
|
||||
@objc func rotated() {
|
||||
|
||||
let orint = UIDevice.current.orientation
|
||||
if orint == .faceUp || orint == .faceDown || orint == .portraitUpsideDown { return }
|
||||
|
||||
updateMapViewTopPadding()
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
mapManager.compass.y = (paddingTop + mapButtons.height + 12)
|
||||
}
|
||||
|
||||
// MARK: - 🗺 Map Manager
|
||||
// MARK: - Map Manager
|
||||
|
||||
func updateMapManager() {
|
||||
|
||||
@@ -186,7 +186,7 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - 🗺 Map Long-Press
|
||||
// MARK: - Map Long-Press
|
||||
|
||||
@IBAction func handleLong(_ recognizer: UILongPressGestureRecognizer) {
|
||||
if routeContainer != nil { return }
|
||||
@@ -239,7 +239,7 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
})
|
||||
}
|
||||
|
||||
// MARK: - 🗺 Map Buttons Alpha
|
||||
// MARK: - Map Buttons Alpha
|
||||
|
||||
func mapButtons(alpha: CGFloat, animation: Bool = true) {
|
||||
if ContainerDevice.isPortrait, !ContainerDevice.isIpad {
|
||||
@@ -330,7 +330,7 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
setNeedsStatusBarAppearanceUpdate()
|
||||
}
|
||||
|
||||
// MARK: - 🦄 Show Maps-Container
|
||||
// MARK: - Show Maps-Container
|
||||
|
||||
func showMapsContainer() {
|
||||
mapsContainer = MapsContainerController(addTo: self, darkStyle: darkStyle)
|
||||
@@ -349,7 +349,7 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
changePositionMapsElements(container: mapsContainerController, position: position, type: type, animation: animation)
|
||||
}
|
||||
|
||||
//MARK: - 🦄 Show Location-Details
|
||||
//MARK: - Show Location-Details
|
||||
|
||||
func showLocationDetailsContainer() {
|
||||
if locationContainer != nil { return }
|
||||
@@ -383,7 +383,7 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
changePositionMapsElements(container: locationContainerController, position: position, type: type, animation: animation)
|
||||
}
|
||||
|
||||
//MARK: - 🦄 Show Route
|
||||
//MARK: - Show Route
|
||||
|
||||
func showRouteContainer() {
|
||||
if routeContainer != nil { return }
|
||||
@@ -408,7 +408,7 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
|
||||
changePositionMapsElements(container: routeContainerController, position: position, type: type, animation: animation)
|
||||
}
|
||||
|
||||
// MARK: - 🦄 Show Menu-Container
|
||||
// MARK: - Show Menu-Container
|
||||
|
||||
func showMenuContainer() {
|
||||
if menuContainer != nil { return }
|
||||
|
||||
@@ -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?
|
||||
@@ -32,9 +23,10 @@ class ViewController: UIViewController {
|
||||
navigationController?.interactivePopGestureRecognizer?.isEnabled = true
|
||||
|
||||
items = [
|
||||
TitleTextItem(title: "Maps.app", clss: MapsViewController.self),
|
||||
TitleTextItem(title: "Example. Settings", clss: ExamplesSettingsViewController.self),
|
||||
TitleTextItem(title: "Example. Add TableView", clss: ExamplesAddTableViewController.self)
|
||||
TitleTextItem(title: "Maps.app", clss: MapsViewController.self),
|
||||
TitleTextItem(title: "Example. Settings", clss: ExamplesSettingsViewController.self),
|
||||
TitleTextItem(title: "Example. Add UITableView", clss: ExampleAddTableViewController.self),
|
||||
TitleTextItem(title: "Example. Add UICollectionView", clss: ExampleAddCollectionViewController.self)
|
||||
]
|
||||
|
||||
tableView?.set(items: items, animated: true)
|
||||
@@ -51,12 +43,6 @@ class ViewController: UIViewController {
|
||||
}
|
||||
|
||||
}
|
||||
override var prefersStatusBarHidden: Bool {
|
||||
return true
|
||||
}
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle {
|
||||
return .lightContent
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 509 KiB |
+10
-10
@@ -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 */ = {
|
||||
|
||||
@@ -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,13 +1,15 @@
|
||||

|
||||
|
||||
# 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
|
||||
|
||||
This is a swipe-panel from application: https://www.apple.com/ios/maps/
|
||||
UI Component. This is a copy swipe-panel from app: https://www.apple.com/ios/maps/
|
||||
|
||||
## Preview
|
||||

|
||||
@@ -16,32 +18,42 @@ This is a swipe-panel from application: https://www.apple.com/ios/maps/
|
||||
|
||||
<!-- TOC -->
|
||||
|
||||
- [Requirements](#requirements)
|
||||
- [Installation CocoaPods](#installation-cocoapods)
|
||||
- [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 -->
|
||||
|
||||
## 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
|
||||
@@ -54,7 +66,9 @@ pod 'ContainerControllerSwift'
|
||||
## Getting Started
|
||||
|
||||
```swift
|
||||
|
||||
import UIKit
|
||||
import ContainerControllerSwift
|
||||
|
||||
class ViewController: UIViewController, ContainerControllerDelegate {
|
||||
|
||||
@@ -99,8 +113,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 {
|
||||
@@ -132,36 +177,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
|
||||
@@ -183,8 +198,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
|
||||
|
||||
@@ -286,45 +323,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)
|
||||
|
||||
```
|
||||
|
||||
@@ -411,7 +432,7 @@ container.set(trackingPosition: false)
|
||||

|
||||

|
||||
|
||||
## ContainerControllerDelegate
|
||||
## ContainerController `Delegate`
|
||||
|
||||
```swift
|
||||
|
||||
@@ -442,6 +463,10 @@ func containerControllerMove(_ containerController: ContainerController, positio
|
||||
|
||||
```
|
||||
|
||||
## Author
|
||||
|
||||
<motionrustam@gmail.com>| [mrustaa](https://github.com/mrustaa/)
|
||||
|
||||
## License
|
||||
|
||||
ContainerController is available under the MIT license. See the LICENSE file for more info.
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// ColletionAdapterCell.swift
|
||||
// CollectionAdapterCell.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by mrustaa on 01/05/2020.
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// ColletionAdapterCellData.swift
|
||||
// CollectionAdapterCellData.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by mrustaa on 01/05/2020.
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// ColletionAdapterItem.swift
|
||||
// CollectionAdapterItem.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by mrustaa on 01/05/2020.
|
||||
+23
-13
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// ContainerView.swift
|
||||
// ContainerController.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by mrustaa on 21/04/2020.
|
||||
@@ -211,19 +211,12 @@ open class ContainerController: NSObject {
|
||||
@objc func rotated() {
|
||||
|
||||
let orint = UIDevice.current.orientation
|
||||
if orint == .faceUp || orint == .faceDown { return }
|
||||
if orint == .faceUp || orint == .faceDown || orint == .portraitUpsideDown { 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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1136,7 +1134,19 @@ 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
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// ContainerView.swift
|
||||
// ContainerControllerDelegate.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by mrustaa on 21/04/2020.
|
||||
+7
-1
@@ -1,4 +1,10 @@
|
||||
|
||||
//
|
||||
// ContainerDevice.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by mrustaa on 21/04/2020.
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// ContainerView.swift
|
||||
// ContainerLayout.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by mrustaa on 21/04/2020.
|
||||
-6
@@ -10,12 +10,6 @@ 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
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// ContainerTypes.swift
|
||||
// TableAdapterTypes.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by mrustaa on 21/04/2020.
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// BlockTableView.swift
|
||||
// TableAdapterView.swift
|
||||
// PatternsSwift
|
||||
//
|
||||
// Created by mrustaa on 16/04/2020.
|
||||
+2
@@ -6,6 +6,8 @@
|
||||
// Copyright © 2020 mrustaa. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
typealias ContainerCompletion = () -> Void
|
||||
|
||||
public enum ContainerMoveType {
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user