Skip to content

Commit

Permalink
Package implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
stefjen07 committed Apr 22, 2023
0 parents commit c9ec688
Show file tree
Hide file tree
Showing 29 changed files with 1,093 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Tinkoff23-Final.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
<key>Tinkoff23Final.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>Tinkoff23-Final</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>Tinkoff23-FinalTests</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>Tinkoff23Final_Tinkoff23-Final</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
31 changes: 31 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// swift-tools-version: 5.7.1
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Tinkoff23Final",
platforms: [
.iOS(.v14)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "Tinkoff23-Final",
targets: ["Tinkoff23-Final"]),
],
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 this package depends on.
.target(
name: "Tinkoff23-Final",
dependencies: []),
.testTarget(
name: "Tinkoff23-FinalTests",
dependencies: ["Tinkoff23-Final"]),
]
)
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Tinkoff23-Final

A description of this package.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"images" : [
{
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.030",
"blue" : "36",
"green" : "16",
"red" : "0"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xF9",
"green" : "0x8B",
"red" : "0x42"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
6 changes: 6 additions & 0 deletions Sources/Tinkoff23-Final/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.060",
"blue" : "0x24",
"green" : "0x10",
"red" : "0x00"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x33",
"green" : "0x33",
"red" : "0x33"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xF8",
"green" : "0xF7",
"red" : "0xF6"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xA2",
"green" : "0x99",
"red" : "0x92"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Image.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions Sources/Tinkoff23-Final/Extensions/UIButton+extension.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// UIButton+extension.swift
// Test1
//
// Created by Евгений on 22.04.23.
//

import UIKit
34 changes: 34 additions & 0 deletions Sources/Tinkoff23-Final/Extensions/UIStackView+extension.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//
// UIStackView+extension.swift
// Test1
//
// Created by Евгений on 22.04.23.
//

import UIKit

extension UIStackView {
func addSpacer(_ size: CGFloat) {
let spacer = UIView()
NSLayoutConstraint.activate([
(axis == .vertical ? spacer.heightAnchor : spacer.widthAnchor)
.constraint(equalToConstant: size)
])
addArrangedSubview(spacer)
}

func removeLastArrangedSubview() {
if let subview = self.arrangedSubviews.last {
self.removeArrangedSubview(subview)
}
}

func removeAllArrangedSubviews() {
let removedSubviews = arrangedSubviews.reduce([]) { (allSubviews, subview) -> [UIView] in
self.removeArrangedSubview(subview)
return allSubviews + [subview]
}
NSLayoutConstraint.deactivate(removedSubviews.flatMap({ $0.constraints }))
removedSubviews.forEach({ $0.removeFromSuperview() })
}
}
20 changes: 20 additions & 0 deletions Sources/Tinkoff23-Final/Interface/TinkoffColors.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// TinkoffColors.swift
// Test1
//
// Created by Евгений on 22.04.23.
//

import UIKit

class TinkoffColors {
static let primaryBackground = UIColor(named: "PrimaryBackground")
static let secondaryBackground = UIColor(named: "SecondaryBackground")

static let primaryText = UIColor(named: "PrimaryText")
static let secondaryText = UIColor(named: "SecondaryText")

static let buttonText = UIColor(named: "ButtonText")
static let buttonBackground = UIColor(named: "ButtonBackground")
static let highlightedButtonBackground = UIColor(named: "HighlightedButtonBackground")
}
18 changes: 18 additions & 0 deletions Sources/Tinkoff23-Final/Interface/TinkoffFonts.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// TinkoffFonts.swift
// Test1
//
// Created by Евгений on 22.04.23.
//

import UIKit

class TinkoffFonts {
static let header = UIFont.systemFont(ofSize: 20, weight: .bold)
static let subheader = UIFont.systemFont(ofSize: 15, weight: .regular)

static let title = UIFont.systemFont(ofSize: 17, weight: .regular)
static let description = UIFont.systemFont(ofSize: 13, weight: .regular)

static let button = UIFont.systemFont(ofSize: 15, weight: .regular)
}
Loading

0 comments on commit c9ec688

Please sign in to comment.