Clean project.
This commit is contained in:
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 22 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 30 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 7.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 41 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 64 KiB |
+5
-1
@@ -23,6 +23,10 @@ Here you find all which using in project:
|
||||
- // MARK: - Init
|
||||
- // MARK: - Lifecycle
|
||||
- // MARK: - Layout
|
||||
- // MARK: - Helpers
|
||||
- // MARK: - Public
|
||||
- // MARK: - Private
|
||||
- // MARK: - Internal
|
||||
- // MARK: - Models
|
||||
- // MARK: - Ovveride
|
||||
|
||||
If you can't find valid, add new to codestyle agreements please. Other can be use if class is large and need struct it even without adding to codestyle agreements.
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
// swift-tools-version: 5.4
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "AppImport",
|
||||
platforms: [
|
||||
.iOS(.v12),
|
||||
.tvOS(.v12),
|
||||
.watchOS(.v3)
|
||||
],
|
||||
products: [
|
||||
.library(name: "AppImport", targets: ["AppImport"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(name: "SparrowKit", url: "https://github.com/ivanvorobei/SparrowKit", .upToNextMajor(from: "3.4.3")),
|
||||
.package(name: "SPDiffable", url: "https://github.com/ivanvorobei/SPDiffable", .upToNextMajor(from: "1.6.2")),
|
||||
.package(name: "SPIndicator", path: "SPIndicator")
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "AppImport",
|
||||
dependencies: [
|
||||
.product(name: "SparrowKit", package: "SparrowKit"),
|
||||
.product(name: "SPDiffable", package: "SPDiffable"),
|
||||
.product(name: "SPIndicator", package: "SPIndicator")
|
||||
]
|
||||
),
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,22 @@
|
||||
// The MIT License (MIT)
|
||||
// Copyright © 2020 Ivan Vorobei (hello@ivanvorobei.by)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
import Foundation
|
||||
@@ -11,12 +11,9 @@
|
||||
F43F829E26578DCA001D9B3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F43F829526578DCA001D9B3D /* LaunchScreen.storyboard */; };
|
||||
F43F829F26578DCA001D9B3D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F43F829726578DCA001D9B3D /* AppDelegate.swift */; };
|
||||
F43F82A126578DCA001D9B3D /* PresetsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F43F829B26578DCA001D9B3D /* PresetsController.swift */; };
|
||||
F46C34BE27071E59005681BA /* SPIndicator in Frameworks */ = {isa = PBXBuildFile; productRef = F46C34BD27071E59005681BA /* SPIndicator */; };
|
||||
F4B96F99265AC34400A01A29 /* SPDiffable in Frameworks */ = {isa = PBXBuildFile; productRef = F4B96F98265AC34400A01A29 /* SPDiffable */; };
|
||||
F457C6AB276927C1005B4E19 /* AppImport in Frameworks */ = {isa = PBXBuildFile; productRef = F457C6AA276927C1005B4E19 /* AppImport */; };
|
||||
F457C6AD27692A1B005B4E19 /* AppImport in Frameworks */ = {isa = PBXBuildFile; productRef = F457C6AC27692A1B005B4E19 /* AppImport */; };
|
||||
F4B96F9C265AC36F00A01A29 /* IndicatorPresetModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4B96F9B265AC36F00A01A29 /* IndicatorPresetModel.swift */; };
|
||||
F4BAA4352658292F00DA5BF7 /* SparrowKit in Frameworks */ = {isa = PBXBuildFile; productRef = F4BAA4342658292F00DA5BF7 /* SparrowKit */; };
|
||||
F4BAA4392658293F00DA5BF7 /* SparrowKit in Frameworks */ = {isa = PBXBuildFile; productRef = F4BAA4382658293F00DA5BF7 /* SparrowKit */; };
|
||||
F4BAA43B2658294200DA5BF7 /* SPIndicator in Frameworks */ = {isa = PBXBuildFile; productRef = F4BAA43A2658294200DA5BF7 /* SPIndicator */; };
|
||||
F4BAA4402658297300DA5BF7 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F4BAA43D2658297300DA5BF7 /* LaunchScreen.storyboard */; };
|
||||
F4BAA4412658297300DA5BF7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F4BAA43E2658297300DA5BF7 /* Assets.xcassets */; };
|
||||
F4BAA4422658297300DA5BF7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4BAA43F2658297300DA5BF7 /* AppDelegate.swift */; };
|
||||
@@ -44,6 +41,7 @@
|
||||
F43F829C26578DCA001D9B3D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
F43F82AB26578F03001D9B3D /* tvOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "tvOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
F43F82B926578F04001D9B3D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
F457C6A92769270D005B4E19 /* AppImport */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = AppImport; sourceTree = "<group>"; };
|
||||
F46C34BC27071E43005681BA /* SPIndicator */ = {isa = PBXFileReference; lastKnownFileType = folder; name = SPIndicator; path = ..; sourceTree = "<group>"; };
|
||||
F4B96F9B265AC36F00A01A29 /* IndicatorPresetModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IndicatorPresetModel.swift; sourceTree = "<group>"; };
|
||||
F4BAA43D2658297300DA5BF7 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
@@ -56,9 +54,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F4B96F99265AC34400A01A29 /* SPDiffable in Frameworks */,
|
||||
F4BAA4352658292F00DA5BF7 /* SparrowKit in Frameworks */,
|
||||
F46C34BE27071E59005681BA /* SPIndicator in Frameworks */,
|
||||
F457C6AB276927C1005B4E19 /* AppImport in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -66,8 +62,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F4BAA4392658293F00DA5BF7 /* SparrowKit in Frameworks */,
|
||||
F4BAA43B2658294200DA5BF7 /* SPIndicator in Frameworks */,
|
||||
F457C6AD27692A1B005B4E19 /* AppImport in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -77,6 +72,7 @@
|
||||
F43F827226578D83001D9B3D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F457C6A92769270D005B4E19 /* AppImport */,
|
||||
F46C34BC27071E43005681BA /* SPIndicator */,
|
||||
F43F829226578DCA001D9B3D /* iOS Example */,
|
||||
F43F82AC26578F03001D9B3D /* tvOS Example */,
|
||||
@@ -175,9 +171,7 @@
|
||||
);
|
||||
name = "iOS Example";
|
||||
packageProductDependencies = (
|
||||
F4BAA4342658292F00DA5BF7 /* SparrowKit */,
|
||||
F4B96F98265AC34400A01A29 /* SPDiffable */,
|
||||
F46C34BD27071E59005681BA /* SPIndicator */,
|
||||
F457C6AA276927C1005B4E19 /* AppImport */,
|
||||
);
|
||||
productName = SparrowKit;
|
||||
productReference = F43F827B26578D83001D9B3D /* iOS Example.app */;
|
||||
@@ -197,8 +191,7 @@
|
||||
);
|
||||
name = "tvOS Example";
|
||||
packageProductDependencies = (
|
||||
F4BAA4382658293F00DA5BF7 /* SparrowKit */,
|
||||
F4BAA43A2658294200DA5BF7 /* SPIndicator */,
|
||||
F457C6AC27692A1B005B4E19 /* AppImport */,
|
||||
);
|
||||
productName = "tvOS Example";
|
||||
productReference = F43F82AB26578F03001D9B3D /* tvOS Example.app */;
|
||||
@@ -231,8 +224,6 @@
|
||||
);
|
||||
mainGroup = F43F827226578D83001D9B3D;
|
||||
packageReferences = (
|
||||
F4BAA4332658292F00DA5BF7 /* XCRemoteSwiftPackageReference "SparrowKit" */,
|
||||
F4B96F97265AC34400A01A29 /* XCRemoteSwiftPackageReference "SPDiffable" */,
|
||||
);
|
||||
productRefGroup = F43F827C26578D83001D9B3D /* Products */;
|
||||
projectDirPath = "";
|
||||
@@ -528,48 +519,14 @@
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
|
||||
/* Begin XCRemoteSwiftPackageReference section */
|
||||
F4B96F97265AC34400A01A29 /* XCRemoteSwiftPackageReference "SPDiffable" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/ivanvorobei/SPDiffable";
|
||||
requirement = {
|
||||
kind = upToNextMajorVersion;
|
||||
minimumVersion = 1.2.4;
|
||||
};
|
||||
};
|
||||
F4BAA4332658292F00DA5BF7 /* XCRemoteSwiftPackageReference "SparrowKit" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/ivanvorobei/SparrowKit";
|
||||
requirement = {
|
||||
kind = upToNextMajorVersion;
|
||||
minimumVersion = 3.0.8;
|
||||
};
|
||||
};
|
||||
/* End XCRemoteSwiftPackageReference section */
|
||||
|
||||
/* Begin XCSwiftPackageProductDependency section */
|
||||
F46C34BD27071E59005681BA /* SPIndicator */ = {
|
||||
F457C6AA276927C1005B4E19 /* AppImport */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
productName = SPIndicator;
|
||||
productName = AppImport;
|
||||
};
|
||||
F4B96F98265AC34400A01A29 /* SPDiffable */ = {
|
||||
F457C6AC27692A1B005B4E19 /* AppImport */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = F4B96F97265AC34400A01A29 /* XCRemoteSwiftPackageReference "SPDiffable" */;
|
||||
productName = SPDiffable;
|
||||
};
|
||||
F4BAA4342658292F00DA5BF7 /* SparrowKit */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = F4BAA4332658292F00DA5BF7 /* XCRemoteSwiftPackageReference "SparrowKit" */;
|
||||
productName = SparrowKit;
|
||||
};
|
||||
F4BAA4382658293F00DA5BF7 /* SparrowKit */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = F4BAA4332658292F00DA5BF7 /* XCRemoteSwiftPackageReference "SparrowKit" */;
|
||||
productName = SparrowKit;
|
||||
};
|
||||
F4BAA43A2658294200DA5BF7 /* SPIndicator */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
productName = SPIndicator;
|
||||
productName = AppImport;
|
||||
};
|
||||
/* End XCSwiftPackageProductDependency section */
|
||||
};
|
||||
|
||||
+4
-4
@@ -6,8 +6,8 @@
|
||||
"repositoryURL": "https://github.com/ivanvorobei/SparrowKit",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "d1a2d489417f98620558da08ddcf44a9d53e58f3",
|
||||
"version": "3.2.0"
|
||||
"revision": "be8adcf0d1f91f04eed460faee78852d15d75acc",
|
||||
"version": "3.4.3"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -15,8 +15,8 @@
|
||||
"repositoryURL": "https://github.com/ivanvorobei/SPDiffable",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "884198fb29a339156b824483bc09e2b488d27e28",
|
||||
"version": "1.4.1"
|
||||
"revision": "d8bf7bb3280dfc98b8ddcf2b1dedd7dacbed1c97",
|
||||
"version": "1.6.5"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
BIN
Binary file not shown.
+1
-1
@@ -12,7 +12,7 @@
|
||||
<key>tvOS Example.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>1</integer>
|
||||
<integer>3</integer>
|
||||
</dict>
|
||||
<key>watchOS Example.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
|
||||
@@ -163,7 +163,7 @@ class PresetsController: SPDiffableTableController {
|
||||
return SPDiffableTableRow(
|
||||
text: preset.name,
|
||||
accessoryType: (preset.id == currentPreset?.id) ? .checkmark : .none,
|
||||
selectionStyle: .none) { [weak self] _ in
|
||||
selectionStyle: .none) { [weak self] _, _ in
|
||||
guard let self = self else { return }
|
||||
self.currentPreset = preset
|
||||
}
|
||||
|
||||
@@ -1,21 +1,15 @@
|
||||
# SPIndicator
|
||||
|
||||
<img align="left" src="https://github.com/ivanvorobei/SPIndicator/blob/main/Assets/Readme/preview-v1.jpg" width="360"/>
|
||||
|
||||
### About
|
||||
<p aligment="left">
|
||||
<img src="https://cdn.ivanvorobei.by/github/spindicator/v1.6/animatable-presets.png?version=1" height="210"/>
|
||||
<img src="https://cdn.ivanvorobei.by/github/spindicator/v1.6/customize.png?version=1" height="210"/>
|
||||
<img src="https://cdn.ivanvorobei.by/github/spindicator/v1.6/bottom-present.png?version=1" height="210"/>
|
||||
</p>
|
||||
|
||||
Mimicrate to indicator which appear when silent mode turn on / off. Availalbe 2 animated presets: `done` & `error`. Also support custom images and present from top, center & bottom side.
|
||||
|
||||
For get alert like in Apple music, use library [SPAlert](https://github.com/ivanvorobei/SPAlert).
|
||||
|
||||
If you like the project, don't forget to `put star ★`<br>Check out my other libraries:
|
||||
|
||||
<p float="left">
|
||||
<a href="https://opensource.ivanvorobei.by">
|
||||
<img src="https://github.com/ivanvorobei/Readme/blob/main/Buttons/more-libraries.svg">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
## Navigate
|
||||
|
||||
- [Installation](#installation)
|
||||
@@ -36,8 +30,6 @@ If you like the project, don't forget to `put star ★`<br>Check out my other li
|
||||
|
||||
Ready for use on iOS 12+, tvOS 12+. Works with Swift 5+. Required Xcode 12.0 and higher.
|
||||
|
||||
<img align="right" src="https://github.com/ivanvorobei/SPIndicator/blob/main/Assets/Readme/spm-install-preview.png" width="520"/>
|
||||
|
||||
### Swift Package Manager
|
||||
|
||||
The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.
|
||||
@@ -46,13 +38,13 @@ Once you have your Swift package set up, adding as a dependency is as easy as ad
|
||||
|
||||
```swift
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/ivanvorobei/SPIndicator", .upToNextMajor(from: "1.5.0"))
|
||||
.package(url: "https://github.com/ivanvorobei/SPIndicator", .upToNextMajor(from: "1.6.0"))
|
||||
]
|
||||
```
|
||||
|
||||
### CocoaPods:
|
||||
|
||||
[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate using CocoaPods, specify it in your `Podfile`:
|
||||
[CocoaPods](https://cocoapods.org) is a dependency manager. For usage and installation instructions, visit their website. To integrate using CocoaPods, specify it in your `Podfile`:
|
||||
|
||||
```ruby
|
||||
pod 'SPIndicator'
|
||||
@@ -62,31 +54,21 @@ pod 'SPIndicator'
|
||||
|
||||
If you prefer not to use any of dependency managers, you can integrate manually. Put `Sources/SPIndicator` folder in your Xcode project. Make sure to enable `Copy items if needed` and `Create groups`.
|
||||
|
||||
<img align="right" src="https://github.com/ivanvorobei/SPIndicator/blob/main/Assets/Readme/error-preview.svg" width="270"/>
|
||||
|
||||
## Quick Start
|
||||
|
||||
For best experience, I recommend presenting indicator by calling the class functions `SPIndicator`. These functions are updated regularly and show the indicator as Apple way:
|
||||
|
||||
```swift
|
||||
SPIndicator.present(title: "Error", message: "Try Again", preset: .error)
|
||||
```
|
||||
|
||||
For using a custom image:
|
||||
|
||||
```swift
|
||||
// Presets:
|
||||
SPIndicator.present(title: "Error", message: "Try Again", preset: .error)
|
||||
|
||||
// For show with custom image:
|
||||
let image = UIImage.init(systemName: "sun.min.fill")!.withTintColor(.systemYellow, renderingMode: .alwaysOriginal)
|
||||
SPIndicator.present(title: "Custom Image", message: "With tint color", preset: .custom(image)))
|
||||
```
|
||||
|
||||
<img align="left" src="https://github.com/ivanvorobei/SPIndicator/blob/main/Assets/Readme/message-only-preview.svg" width="210"/>
|
||||
|
||||
For showing a simple text message:
|
||||
|
||||
```swift
|
||||
// For show text only:
|
||||
SPIndicator.present(title: "Error", haptic: .error)
|
||||
```
|
||||
You can provide message optional too.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -151,17 +133,8 @@ It will apply for all alerts. I recomend set it in app delegate. But you can cha
|
||||
|
||||
## Russian Community
|
||||
|
||||
Подписывайся в телеграм-канал, если хочешь получать уведомления о новых туториалах.<br>
|
||||
Со сложными и непонятными задачами помогут в чате.
|
||||
|
||||
<p float="left">
|
||||
<a href="https://sparrowcode.by/telegram">
|
||||
<img src="https://github.com/ivanvorobei/Readme/blob/main/Buttons/open-telegram-channel.svg">
|
||||
</a>
|
||||
<a href="https://sparrowcode.by/telegram/chat">
|
||||
<img src="https://github.com/ivanvorobei/Readme/blob/main/Buttons/russian-community-chat.svg">
|
||||
</a>
|
||||
</p>
|
||||
Я веду [телеграм-канал](https://sparrowcode.by/telegram), там публикую новости и туториалы.<br>
|
||||
С проблемой помогут [в чате](https://sparrowcode.by/telegram/chat).
|
||||
|
||||
Видео-туториалы выклыдываю на [YouTube](https://ivanvorobei.by/youtube):
|
||||
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
s.name = 'SPIndicator'
|
||||
s.version = '1.5.0'
|
||||
s.summary = 'Floating indicator, mimicrate to indicator which appear when silent mode turn on / off. Support large texts.'
|
||||
s.version = '1.6.0'
|
||||
s.summary = 'Floating indicator, mimicrate to indicator which appear when silent mode switched. Can be present from top and bottom. Interactive with gesters.'
|
||||
s.homepage = 'https://github.com/ivanvorobei/SPIndicator'
|
||||
s.source = { :git => 'https://github.com/ivanvorobei/SPIndicator.git', :tag => s.version }
|
||||
s.license = { :type => "MIT", :file => "LICENSE" }
|
||||
|
||||
@@ -3,6 +3,5 @@
|
||||
Here provided ideas or features which will be implemented soon.
|
||||
|
||||
- Add grades for left and right side when text not fit, including scroll animation for label
|
||||
- Add tvOS version (left-top corner)
|
||||
- Add tvOS docs
|
||||
- If appear more doing stack.
|
||||
- Add tvOS version (left-top corner) & docs.
|
||||
- If appear more show like stack.
|
||||
|
||||
Reference in New Issue
Block a user