Update podspec only Source

This commit is contained in:
mrustaa
2021-11-16 15:03:18 +03:00
parent 3c2848ffd1
commit f2e8d4411f
159 changed files with 2 additions and 12319 deletions
@@ -1,26 +0,0 @@
<?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 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"/>
<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>
@@ -1,116 +0,0 @@
//
// 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)
}
}