Skip to content

Commit

Permalink
Updated SPM and example.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanvorobei committed May 1, 2021
1 parent 08b0a23 commit a5482e8
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions Example iOS/Controllers/PresetsController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,27 +68,27 @@ class PresetsController: SPDiffableTableController {

// MARK: - Data

fileprivate var presets: [AlertPreset] {
fileprivate var presets: [AlertPresetModel] {
return [
AlertPreset(
AlertPresetModel(
name: "Done",
title: "Added to Library",
message: nil,
preset: .done
),
AlertPreset(
AlertPresetModel(
name: "Error",
title: "Oops",
message: "Please try again later",
preset: .error
),
AlertPreset(
AlertPresetModel(
name: "Heart",
title: "Love",
message: "We'll recommend more like this for you",
preset: .heart
),
AlertPreset(
AlertPresetModel(
name: "Custom Image",
title: "Custom Image",
message: "Passed UIImage object for preset with style custom.",
Expand All @@ -99,7 +99,7 @@ class PresetsController: SPDiffableTableController {

// MARK: - Diffable

var currentPreset: AlertPreset? {
var currentPreset: AlertPresetModel? {
willSet {
guard let id = self.currentPreset?.id else { return }
let cell = diffableDataSource?.cell(UITableViewCell.self, for: id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import UIKit
/**
Example wrapper model.
*/
struct AlertPreset {
struct AlertPresetModel {

var name: String
var title: String
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.3
// swift-tools-version: 5.4

import PackageDescription

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Animation of widgets from iOS 14. 3D transform with dynamic shadow. [Video previ
#### [SPDiffable](https://github.com/ivanvorobei/SPDiffable)
Simplifies working with animated changes in table and collections. Apple's diffable API required models for each object type. If you want use it in many place, you pass time to implement it and get over duplicates codes. This project help do it elegant with shared models and special cell providers. Support side bar iOS14 and already has native cell providers and views.

#### [Telegram Stikers](https://sparrowcode.by/telegram/stickers/spalert)
#### [Telegram Stikers SPAlert](https://sparrowcode.by/telegram/stickers/spalert) [Stikers iOS Dev](https://sparrowcode.by/telegram/stickers)
You can import stikers for Telegram about iOS Development. Stickers with Xcode elements you know.

## Russian Community
Expand Down
2 changes: 1 addition & 1 deletion SPAlert.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = 'SPAlert'
s.version = '3.0.6'
s.version = '3.0.7'
s.summary = 'Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets.'
s.homepage = 'https://github.com/ivanvorobei/SPAlert'
s.license = { :type => "MIT", :file => "LICENSE" }
Expand Down
8 changes: 4 additions & 4 deletions SPAlert.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
F48672B625762EC900EC1A4E /* SPAlertIconDoneView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F48672B525762EC900EC1A4E /* SPAlertIconDoneView.swift */; };
F48672B725762EC900EC1A4E /* SPAlertIconDoneView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F48672B525762EC900EC1A4E /* SPAlertIconDoneView.swift */; };
F4D6FAE625663EA70046A328 /* PresetsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4D6FAE525663EA70046A328 /* PresetsController.swift */; };
F4E68B2C2572369F00276B45 /* AlertPreset.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E68B2B2572369F00276B45 /* AlertPreset.swift */; };
F4E68B2C2572369F00276B45 /* AlertPresetModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E68B2B2572369F00276B45 /* AlertPresetModel.swift */; };
F4F90B96256647BB000594C4 /* SPAlertIconPreset.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4283BE52564ED8D009A03FC /* SPAlertIconPreset.swift */; };
F4F90B97256647BB000594C4 /* SPAlertHaptic.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4283BF52564EF2A009A03FC /* SPAlertHaptic.swift */; };
F4F90B98256647BB000594C4 /* SPAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4283BEF2564EE87009A03FC /* SPAlertView.swift */; };
Expand Down Expand Up @@ -52,7 +52,7 @@
F4D0F010256F80F50089ACBC /* SPAlert.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = SPAlert.podspec; sourceTree = "<group>"; };
F4D0F011256F80F50089ACBC /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
F4D6FAE525663EA70046A328 /* PresetsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PresetsController.swift; sourceTree = "<group>"; };
F4E68B2B2572369F00276B45 /* AlertPreset.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertPreset.swift; sourceTree = "<group>"; };
F4E68B2B2572369F00276B45 /* AlertPresetModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertPresetModel.swift; sourceTree = "<group>"; };
F4FBB22A2563ACBB00344472 /* SPAlert_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SPAlert_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F4FBB22D2563ACBB00344472 /* SPAlert.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SPAlert.h; sourceTree = "<group>"; };
F4FBB22E2563ACBB00344472 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
Expand Down Expand Up @@ -121,7 +121,7 @@
F4E68B2A2572369700276B45 /* Models */ = {
isa = PBXGroup;
children = (
F4E68B2B2572369F00276B45 /* AlertPreset.swift */,
F4E68B2B2572369F00276B45 /* AlertPresetModel.swift */,
);
path = Models;
sourceTree = "<group>";
Expand Down Expand Up @@ -353,7 +353,7 @@
F4F90B97256647BB000594C4 /* SPAlertHaptic.swift in Sources */,
F48672AE25762E9400EC1A4E /* SPAlertIconAnimatable.swift in Sources */,
F4D6FAE625663EA70046A328 /* PresetsController.swift in Sources */,
F4E68B2C2572369F00276B45 /* AlertPreset.swift in Sources */,
F4E68B2C2572369F00276B45 /* AlertPresetModel.swift in Sources */,
F48672B625762EC900EC1A4E /* SPAlertIconDoneView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
Binary file not shown.

0 comments on commit a5482e8

Please sign in to comment.