Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: 2.0.0 #7

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Tests

on:
push:
branches-ignore:
- master
pull_request:
types: [opened, synchronize]
OleksandrKulyk marked this conversation as resolved.
Show resolved Hide resolved

jobs:
run_tests:
Expand All @@ -12,4 +11,4 @@ jobs:
- name: Prepare branch on runner
uses: actions/checkout@v3
- name: Build & Test
run: xcodebuild build clean test -scheme "Uptech-iOS-Helpers" -destination "platform=iOS Simulator,name=IPhone 11"
run: xcodebuild build clean test -scheme "Uptech-iOS-Helpers-Package" -destination "platform=iOS Simulator,name=IPhone 15"
28 changes: 19 additions & 9 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,23 @@
import PackageDescription

let package = Package(
name: "Uptech-iOS-Helpers",
platforms: [.iOS(.v11)],
products: [
.library(name: "Uptech-iOS-Helpers", targets: ["Uptech-iOS-Helpers"]),
],
targets: [
.target(name: "Uptech-iOS-Helpers", dependencies: []),
.testTarget(name: "Uptech-iOS-Helpers-Tests", dependencies: ["Uptech-iOS-Helpers"]),
]
name: "Uptech-iOS-Helpers",
platforms: [.iOS(.v13)],
products: [
.library(name: "Uptech-iOS-Helpers", targets: ["UptechFoundationHelper", "UptechUIKitHelper", "UptechSwiftUIHelper"]),
.library(name: "UptechFoundationHelper", targets: ["UptechFoundationHelper"]),
.library(name: "UptechUIKitHelper", targets: ["UptechUIKitHelper"]),
.library(name: "UptechSwiftUIHelper", targets: ["UptechSwiftUIHelper"])
OleksandrKulyk marked this conversation as resolved.
Show resolved Hide resolved
],
targets: [
.target(name: "UptechFoundationHelper", path: "Sources/Uptech-iOS-Helpers/FoundationHelper"),
.target(name: "UptechUIKitHelper", path: "Sources/Uptech-iOS-Helpers/UIKitHelper"),
.target(name: "UptechSwiftUIHelper", path: "Sources/Uptech-iOS-Helpers/SwiftUIHelper"),
.testTarget(name: "FoundationHelper-Test",
dependencies: ["UptechFoundationHelper"],
path: "Tests/Uptech-iOS-Helpers-Tests/FoundationHelper"),
.testTarget(name: "UIKitHelper-Test",
dependencies: ["UptechUIKitHelper"],
path: "Tests/Uptech-iOS-Helpers-Tests/UIKitHelper")
]
)
90 changes: 64 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,79 @@
iOS helper library that contains commonly used code in **Uptech** iOS projects.

## What's included
- Protocols
- **ReusableCell**

Protocol that helps with reusable cells.
<details>

<summary><strong>🔧 Foundation Helpers</strong></summary>


- Array extensions
- safe subscript
- next, previous, remove *Element* methods

- Collection:
- subscript by indexPath

</details>

<details>

<summary><strong>🖼️ UIKit Helpers</strong></summary>


- Protocols
- **ReusableCell**

Protocol that helps with reusable cells.

If used on UITableViewCell subclasses provides handy methods for registering and dequeueing cells in UITableView's

If used on UITableViewCell subclasses provides handy methods for registering and dequeueing cells in UITableView's

- **NibInitializable**

Protocol that helps to initialize view with xib.
- Table & Collection View helpers
- *dequeue* and *register* methods for cells that confirm's to **ReusableCell** and optionally **NibInitializable** (for cell's created via xibs)
- UI-in-code helpers
- UIView extensions:
- subview adding, insertions *with* constrains
- corner radius
- NSLayoutConstraint:
- priority changing method
- constraint activation method for array of constrains
- UILayoutPriority:
- frequently used values
- Array extensions
- safe subscript
- next, previous, remove *Element* methods
- Collection:
- subscript by indexPath
- **NibInitializable**

Protocol that helps to initialize view with xib.
- Table & Collection View helpers
- *dequeue* and *register* methods for cells that confirm's to **ReusableCell** and optionally **NibInitializable** (for cell's created via xibs)
- UI-in-code helpers
- UIView extensions:
- subview adding, insertions *with* constrains
- corner radius
- NSLayoutConstraint:
- priority changing method
- constraint activation method for array of constrains
- UILayoutPriority:
- frequently used values

</details>

<details>

<summary><strong>🕊️ SwiftUI helpers</strong></summary>


- Layouts
- ProportionalHStack and ProportionalVStack
- Layouts that resizes views with given proportions

- View extensions
- conditionalModifiers (if, if/else), regular modifier
- customOnChange
- size/frame/offset/safeAreaInsets readers

</details>

## Installation

#### Swift Package Manager
*Note: Instructions below are for using SwiftPM without the Xcode UI. It's the easiest to go to your Project Settings -> Swift Packages and add Package from there using link https://github.com/uptechteam/Uptech-iOS-Helpers.git*

Package contains 4 libraries:
- UptechFoundationHelper
- UptechUIKitHelper
- UptechSwiftUIHelper
- Uptech-iOS-Helpers (first 3 combined)

To integrate using Apple's Swift package manager, without Xcode integration, add the following as a dependency to your Package.swift:
```swift
.package(url: "https://github.com/uptechteam/Uptech-iOS-Helpers.git", .upToNextMajor(from: "1.0.0"))
.package(url: "https://github.com/uptechteam/Uptech-iOS-Helpers.git", .upToNextMajor(from: "2.0.0"))
```

#### CocoaPods
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading