From 620f898c54c17db79a49acf911f467ca3bc1554f Mon Sep 17 00:00:00 2001 From: Boris Bugor Date: Thu, 12 Oct 2023 17:11:47 +0300 Subject: [PATCH 1/3] added spm support --- .DS_Store | Bin 0 -> 6148 bytes Demo/.DS_Store | Bin 0 -> 6148 bytes Demo/HandyTextExample/.DS_Store | Bin 0 -> 6148 bytes .../project.pbxproj | 78 +++++++----------- .../HandyTextExample/ApplicationFonts.swift | 1 + .../HandyTextExample/ApplicationStyles.swift | 1 + .../HandyTextExample/ViewController.swift | 1 + HandyText/.gitignore | 9 ++ HandyText/Package.swift | 28 +++++++ HandyText/README.md | 3 + HandyText/{ => Sources/HandyText}/Font.swift | 0 .../NSAttributedString+TextStyle.swift | 0 .../HandyText}/String+TagScheme.swift | 0 .../HandyText}/String+TextStyle.swift | 0 .../{ => Sources/HandyText}/TagScheme.swift | 2 +- .../HandyText}/TextStyle+Modifiers.swift | 0 .../{ => Sources/HandyText}/TextStyle.swift | 2 +- .../HandyText}/TextStyleApplicable.swift | 0 .../UIBarButtonItem+TextStyleApplicable.swift | 0 .../UINavigationBar+TextStyle.swift | 0 .../Tests/HandyTextTests/HandyTextTests.swift | 11 +++ 21 files changed, 86 insertions(+), 50 deletions(-) create mode 100644 .DS_Store create mode 100644 Demo/.DS_Store create mode 100644 Demo/HandyTextExample/.DS_Store create mode 100644 HandyText/.gitignore create mode 100644 HandyText/Package.swift create mode 100644 HandyText/README.md rename HandyText/{ => Sources/HandyText}/Font.swift (100%) rename HandyText/{ => Sources/HandyText}/NSAttributedString+TextStyle.swift (100%) rename HandyText/{ => Sources/HandyText}/String+TagScheme.swift (100%) rename HandyText/{ => Sources/HandyText}/String+TextStyle.swift (100%) rename HandyText/{ => Sources/HandyText}/TagScheme.swift (94%) rename HandyText/{ => Sources/HandyText}/TextStyle+Modifiers.swift (100%) rename HandyText/{ => Sources/HandyText}/TextStyle.swift (99%) rename HandyText/{ => Sources/HandyText}/TextStyleApplicable.swift (100%) rename HandyText/{ => Sources/HandyText}/UIBarButtonItem+TextStyleApplicable.swift (100%) rename HandyText/{ => Sources/HandyText}/UINavigationBar+TextStyle.swift (100%) create mode 100644 HandyText/Tests/HandyTextTests/HandyTextTests.swift diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..34e70f61a7041a127366c64ba22d5dba36a828c6 GIT binary patch literal 6148 zcmeHK!AiqG5S?wSO(;SS3OxqA7HmN&#Y?CaJe#5im718M!8BW%)GDQrv;L4@;`cbS zyDgULNf0SBF#Bd_XOiqo*vSBZ=uE;UKotNiRKkLd!#6_fq-#ltAsh9cLB<=X)E1LDB zjDv;k2N%&`+OO`O$RzWlWH43Vm>&qw!<+LLwNtmi!PcK-uW%sMK*{s=W*PX_^ z?#!A;hiEn%t@eCwTYLKl$LIaWc$mmnO`^c>P05bI1-zlL+)tR^#Q{Da1uvaX-Z+V6 za*sap+i(UxBoM+2^pJ*U$QEh1%EAmV1I)liGGNY7tFn>1<4rLG%)oCLp!2~&C3Fqu z8r9K(gK7Z~={Hgd+SE%>j$_a@m}|rp6rocQb*eBehS2HgcTAjXFxRNlL73)4m^%y8 zp$K(%yuPEtLAV-uWCoalRR)TBTBZ7b`g8xkn#40^fEm~*21Kdrbvw8vQ(MX)L@$Sh3Aht9RDH%{O)`@p_oca>G}J+g>OV-Dkw{4)i^11g4l;-T;x^V?LMm3TKmKL zhPUBudf%gKJ&WqNo>qf+a?Za_wJwsS9Vg%NY&P^i9_q4=^D>*5ggngmKwMi;lOw`{~Qq;m=}J>U&GB!gpw7 z%i$7!!FctYX?0a3*f%G=8hjH?%0ibv5W8HI^F)LJVL%vo2MoAt%iDYhdzCE;1H!=D zGQjsk0A&mvHWtm*fx)x@z&6}QU~@0QIf28_VPg?95M@(=HdVP6L)mor0~Z%MY%JPz zQm*+>Ze`^<6lGS&^8*u3Dzqr0Fdz*4$pH6$5TENm`t_Ike-k8wFdz*4pA4w>QFJuG z*<5X1IVIQH0D1{!;kd@)Qwj`IiV@4Dcn4|({(uc&=&-Q}4@CY57#d^{2Huo`-{y>5 A0RR91 literal 0 HcmV?d00001 diff --git a/Demo/HandyTextExample/.DS_Store b/Demo/HandyTextExample/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..d3233126812e88bc06eda2742d5a372e9f9c375a GIT binary patch literal 6148 zcmeHK!AiqG5Pe&FhSez`=pV!q!F#={ZE8gl6GWlj@*5ug1V6!p2XB6epWwka zJ4;3rP%&ao&n;Ki#bPv>Rb{Q4dVJZmPFZEy zw5X=cPoCb+a8SG+ZC)#HYdwEnehhz6tG-&@-@9(ptTA8=7z5kE0DHDbvZrX)7%&Em zftCTeA3Rksjo2uLtAi$t07UtX48pa{5|ZO1rV$%OzM(ixC2FdRBZkv-`hAQ`BQ}bf z4i|?H7r*S{gyO>2S>K0nxKz=sF<=a=Gq9tN1L^;q*MFM-*OTnY7%&F5iUHTpCfS%< zioLb7Iq9{YdQKIQxJI!};UctR#!4&Rrv{ TextStyle -public class TagScheme { +open class TagScheme { private var map = [String: TextStyleModifier]() diff --git a/HandyText/TextStyle+Modifiers.swift b/HandyText/Sources/HandyText/TextStyle+Modifiers.swift similarity index 100% rename from HandyText/TextStyle+Modifiers.swift rename to HandyText/Sources/HandyText/TextStyle+Modifiers.swift diff --git a/HandyText/TextStyle.swift b/HandyText/Sources/HandyText/TextStyle.swift similarity index 99% rename from HandyText/TextStyle.swift rename to HandyText/Sources/HandyText/TextStyle.swift index bd3d493..9205188 100644 --- a/HandyText/TextStyle.swift +++ b/HandyText/Sources/HandyText/TextStyle.swift @@ -9,7 +9,7 @@ import UIKit //TODO: generate attributes on demand to avoid recalculations -public class TextStyle { +open class TextStyle { public enum BaselineOffset { case none diff --git a/HandyText/TextStyleApplicable.swift b/HandyText/Sources/HandyText/TextStyleApplicable.swift similarity index 100% rename from HandyText/TextStyleApplicable.swift rename to HandyText/Sources/HandyText/TextStyleApplicable.swift diff --git a/HandyText/UIBarButtonItem+TextStyleApplicable.swift b/HandyText/Sources/HandyText/UIBarButtonItem+TextStyleApplicable.swift similarity index 100% rename from HandyText/UIBarButtonItem+TextStyleApplicable.swift rename to HandyText/Sources/HandyText/UIBarButtonItem+TextStyleApplicable.swift diff --git a/HandyText/UINavigationBar+TextStyle.swift b/HandyText/Sources/HandyText/UINavigationBar+TextStyle.swift similarity index 100% rename from HandyText/UINavigationBar+TextStyle.swift rename to HandyText/Sources/HandyText/UINavigationBar+TextStyle.swift diff --git a/HandyText/Tests/HandyTextTests/HandyTextTests.swift b/HandyText/Tests/HandyTextTests/HandyTextTests.swift new file mode 100644 index 0000000..3a060b4 --- /dev/null +++ b/HandyText/Tests/HandyTextTests/HandyTextTests.swift @@ -0,0 +1,11 @@ +import XCTest +@testable import HandyText + +final class HandyTextTests: XCTestCase { + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct + // results. + XCTAssertEqual(HandyText().text, "Hello, World!") + } +} From adf2616f92c0207442fe1238390786f6febf0bb7 Mon Sep 17 00:00:00 2001 From: Boris Bugor Date: Thu, 12 Oct 2023 17:27:29 +0300 Subject: [PATCH 2/3] spm reorganization of files --- .DS_Store | Bin 6148 -> 6148 bytes .gitignore | 72 +-------- Demo/.DS_Store | Bin 6148 -> 0 bytes Demo/HandyTextExample/.DS_Store | Bin 6148 -> 0 bytes HandyText/.gitignore | 9 -- HandyText/README.md | 3 - .../Tests/HandyTextTests/HandyTextTests.swift | 11 -- HandyText/Package.swift => Package.swift | 0 README.md | 147 +----------------- .../project.pbxproj | 20 ++- .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../HandyTextExample/AppDelegate.swift | 0 .../HandyTextExample/ApplicationFonts.swift | 0 .../HandyTextExample/ApplicationStyles.swift | 0 .../AppIcon.appiconset/Contents.json | 0 .../Base.lproj/LaunchScreen.storyboard | 0 .../Base.lproj/Main.storyboard | 0 .../HandyTextExample/Info.plist | 0 .../HandyTextExample/ViewController.swift | 0 .../Sources => Sources}/HandyText/Font.swift | 0 .../NSAttributedString+TextStyle.swift | 0 .../HandyText/String+TagScheme.swift | 0 .../HandyText/String+TextStyle.swift | 0 .../HandyText/TagScheme.swift | 0 .../HandyText/TextStyle+Modifiers.swift | 0 .../HandyText/TextStyle.swift | 0 .../HandyText/TextStyleApplicable.swift | 0 .../UIBarButtonItem+TextStyleApplicable.swift | 0 .../HandyText/UINavigationBar+TextStyle.swift | 0 Tests/HandyTextTests/HandyTextTests.swift | 8 + 31 files changed, 32 insertions(+), 238 deletions(-) delete mode 100644 Demo/.DS_Store delete mode 100644 Demo/HandyTextExample/.DS_Store delete mode 100644 HandyText/.gitignore delete mode 100644 HandyText/README.md delete mode 100644 HandyText/Tests/HandyTextTests/HandyTextTests.swift rename HandyText/Package.swift => Package.swift (100%) mode change 100755 => 100644 README.md rename {Demo => Sources/Demo}/HandyTextExample/HandyTextExample.xcodeproj/project.pbxproj (95%) rename {Demo => Sources/Demo}/HandyTextExample/HandyTextExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename {Demo => Sources/Demo}/HandyTextExample/HandyTextExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename {Demo => Sources/Demo}/HandyTextExample/HandyTextExample/AppDelegate.swift (100%) rename {Demo => Sources/Demo}/HandyTextExample/HandyTextExample/ApplicationFonts.swift (100%) rename {Demo => Sources/Demo}/HandyTextExample/HandyTextExample/ApplicationStyles.swift (100%) rename {Demo => Sources/Demo}/HandyTextExample/HandyTextExample/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename {Demo => Sources/Demo}/HandyTextExample/HandyTextExample/Base.lproj/LaunchScreen.storyboard (100%) rename {Demo => Sources/Demo}/HandyTextExample/HandyTextExample/Base.lproj/Main.storyboard (100%) rename {Demo => Sources/Demo}/HandyTextExample/HandyTextExample/Info.plist (100%) rename {Demo => Sources/Demo}/HandyTextExample/HandyTextExample/ViewController.swift (100%) rename {HandyText/Sources => Sources}/HandyText/Font.swift (100%) rename {HandyText/Sources => Sources}/HandyText/NSAttributedString+TextStyle.swift (100%) rename {HandyText/Sources => Sources}/HandyText/String+TagScheme.swift (100%) rename {HandyText/Sources => Sources}/HandyText/String+TextStyle.swift (100%) rename {HandyText/Sources => Sources}/HandyText/TagScheme.swift (100%) rename {HandyText/Sources => Sources}/HandyText/TextStyle+Modifiers.swift (100%) rename {HandyText/Sources => Sources}/HandyText/TextStyle.swift (100%) rename {HandyText/Sources => Sources}/HandyText/TextStyleApplicable.swift (100%) rename {HandyText/Sources => Sources}/HandyText/UIBarButtonItem+TextStyleApplicable.swift (100%) rename {HandyText/Sources => Sources}/HandyText/UINavigationBar+TextStyle.swift (100%) create mode 100644 Tests/HandyTextTests/HandyTextTests.swift diff --git a/.DS_Store b/.DS_Store index 34e70f61a7041a127366c64ba22d5dba36a828c6..0aefacfd4a655fb95e335576eaeb30a4c16c5adf 100644 GIT binary patch literal 6148 zcmeHKO-lnY5Ph)~t6qBW;4#0TOAA%JEv1476`|_cZo3p=b!EFnz3or;O%jV`Yr%_@ zG6OR&JDJJHOOrGJ%wRF?0&M^-s$lboW{pU_XifHl=YVKj8=tsGiVu{qwPnY zXImfR=Givz%r%)!=aVeS^Gtqz2VAJi4QU#ytUuO}d@1EN=s?Nl}FZ4j87%{R1=;U#;4P7 zLtGrN^61lH!sEk)o=te67}q=7w=Nte_NZ1FPzF{RX!y^z-2a!qzyDX0^h+5~26l=8 z(;SY515PR2t+mO?U2CaNR1t}*Jh~K`a2>mXT*aqUC#~g07 delta 367 zcmZoMXfc=|#>B)qu~2NHo}wrV0|Nsi1A_oVQh9MfQcivnkiTPN;c~`$kPHih3qvYH zE<--DY*Il^W^svu!8JxEW)@a9b`Ew9ZjRXCjQsN8lEjkIVyDESXb>+XKR+i4#!gHM z%S%}Xf;>kZDV2g`79a&X2ANK{uF znp^597}V-0R2!O_0GWmc=9aa!oE)Oc`qn}5**Up+`CUK<0|6t@J7B;IrD0SzkOB8l zN^x>d63~Gl#c;v0;G(>o{JeCa7^57J;AHS%NMy)kNMWdC2muB}1w#o;-)2D$F_wu9 hr#7>5@N)oz6UhJ0Jegm_kprj?6rwDfBSh9P0{{}cTJQh> diff --git a/.gitignore b/.gitignore index 2c22487..3b29812 100644 --- a/.gitignore +++ b/.gitignore @@ -1,65 +1,9 @@ -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData/ - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 +.DS_Store +/.build +/Packages +/*.xcodeproj xcuserdata/ - -## Other -*.moved-aside -*.xcuserstate - -## Obj-C/Swift specific -*.hmap -*.ipa -*.dSYM.zip -*.dSYM - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md - -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots -fastlane/test_output +DerivedData/ +.swiftpm/config/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc diff --git a/Demo/.DS_Store b/Demo/.DS_Store deleted file mode 100644 index 679d9e71f6b847ec5dd3f70c0dd75c9aad54cd83..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKQA^`M5T30)O%WjvC-@lfRk#*Bq})rW3O--te9)sNCY<5YY-v)fltP}pKjbg* z_uMzTTk+_LZ*m?pF#AnsXR^Cr!cK>X)L@$Sh3Aht9RDH%{O)`@p_oca>G}J+g>OV-Dkw{4)i^11g4l;-T;x^V?LMm3TKmKL zhPUBudf%gKJ&WqNo>qf+a?Za_wJwsS9Vg%NY&P^i9_q4=^D>*5ggngmKwMi;lOw`{~Qq;m=}J>U&GB!gpw7 z%i$7!!FctYX?0a3*f%G=8hjH?%0ibv5W8HI^F)LJVL%vo2MoAt%iDYhdzCE;1H!=D zGQjsk0A&mvHWtm*fx)x@z&6}QU~@0QIf28_VPg?95M@(=HdVP6L)mor0~Z%MY%JPz zQm*+>Ze`^<6lGS&^8*u3Dzqr0Fdz*4$pH6$5TENm`t_Ike-k8wFdz*4pA4w>QFJuG z*<5X1IVIQH0D1{!;kd@)Qwj`IiV@4Dcn4|({(uc&=&-Q}4@CY57#d^{2Huo`-{y>5 A0RR91 diff --git a/Demo/HandyTextExample/.DS_Store b/Demo/HandyTextExample/.DS_Store deleted file mode 100644 index d3233126812e88bc06eda2742d5a372e9f9c375a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK!AiqG5Pe&FhSez`=pV!q!F#={ZE8gl6GWlj@*5ug1V6!p2XB6epWwka zJ4;3rP%&ao&n;Ki#bPv>Rb{Q4dVJZmPFZEy zw5X=cPoCb+a8SG+ZC)#HYdwEnehhz6tG-&@-@9(ptTA8=7z5kE0DHDbvZrX)7%&Em zftCTeA3Rksjo2uLtAi$t07UtX48pa{5|ZO1rV$%OzM(ixC2FdRBZkv-`hAQ`BQ}bf z4i|?H7r*S{gyO>2S>K0nxKz=sF<=a=Gq9tN1L^;q*MFM-*OTnY7%&F5iUHTpCfS%< zioLb7Iq9{YdQKIQxJI!};UctR#!4&Rrv{ - -### Merging attributed strings -Attributed strings can be combined to achieve more complex appearance: -```swift -let title = "First name: ".withStyle(.placeholder) -let name = "Michael".withStyle(.plainText) -label.attributedText = title + name - ``` - - -### Highlighting words -You can highlight specific substrings with a different text style: -```swift -let text = "There are three species of zebras: the plains zebra, the Grévy's zebra and the mountain zebra" -label.attributedText = text.withStyle(.plainText).applyStyle(.header1, toOccurencesOf: "zebra") -``` - - - -For displaying strings with tags you define a tag scheme: -```swift - let scheme = TagScheme() - scheme.forTag("b") { $0.bold() } - scheme.forTag("i") { $0.italic() } -``` -In the scheme for each custom tag you register a block defining the modification of the initial text style. -Nested tags are supported. Text marked as following ```"lions"``` will be bold italic. -To convert a string into an attributed string: -```swift -let result = "about zebras".withStyle(.plainText, tagScheme: scheme) -``` - - - -FAQ --------------- -### How many styles do I need? -As little as possible. Average application has 2-3 basic and several complementary text styles. It's not necessary to create a new style if it differs with only the color or alignment. Better to extend the style at place. - -### Absolute or relative size? -You are used to define text size in points: 10 for plain text, 15 for heading and so on. But let's look from another angle: what this numbers mean? I guess, the designer could think something like 'let headers be a half times more than normal text'. Due to method ```withSizeMultiplied(by:)``` you can define text sizes proportionally. In this case, when the base style changes its size, the whole text scheme scales proportionally. Baseline offset can also be defined relative, which will keep proportions in custom superscripts like below: - - - -### What can make the text size change? -Here are some ideas. By using Dynamic Text Size in the base style, you will make your app sensitive to the Accessibility preferences of the device. For large devices it's reasonable to use slightly larger fonts. Some apps allow users to change appearance themes. With HandyText updating fonts becomes a simple task. - - - -### Too many outlets! -To use HandyText effectively you must create an outlet for every text containing view. Is it that bad? In well-designed projects all strings are kept in the single file: Localizable.strings. Not in storyboards, not in the code. With this approach the whole app can be translated into a new language without changing a line of code. HandyText lib encourages you to use this approach: fetch a localized string, apply a style, display the result in the corresponding outlet. - -### How to add links to my attributed text? -The library doesn't add any new abilities to UIKit classes. For assigning a link to a chunk of text it uses NSLinkAttributeName. For more info refer to the [official docs](https://developer.apple.com/reference/uikit/uitextviewdelegate/1649337-textview). - -### How do I call my text styles? -Avoid giving names based on specific usage, try to keep it more generic. For instance, 'screenHeading' is a good name, 'orangeHeaderInFriendsList' – is not. - -### Can HandyText help me improve my design specs? -Of course. As a developer, together with design team you can define a table of common text styles and rules for describing modifiers. Instead of "HelveticaNeue-Bold, 15 pt, color: FF0000" it can be "style: header, color: tomatoRed". - - -License ----------------- - - The MIT License (MIT) - - Copyright © 2016 Aleksey Chernish - - 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. +# HandyText +A description of this package. diff --git a/Demo/HandyTextExample/HandyTextExample.xcodeproj/project.pbxproj b/Sources/Demo/HandyTextExample/HandyTextExample.xcodeproj/project.pbxproj similarity index 95% rename from Demo/HandyTextExample/HandyTextExample.xcodeproj/project.pbxproj rename to Sources/Demo/HandyTextExample/HandyTextExample.xcodeproj/project.pbxproj index 2911189..445f1d8 100644 --- a/Demo/HandyTextExample/HandyTextExample.xcodeproj/project.pbxproj +++ b/Sources/Demo/HandyTextExample/HandyTextExample.xcodeproj/project.pbxproj @@ -14,7 +14,7 @@ 5B31FAE71DF45BE900EC9D42 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5B31FAE51DF45BE900EC9D42 /* LaunchScreen.storyboard */; }; 5BC2FEF51DF50C3900463413 /* ApplicationFonts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BC2FEF31DF50C3900463413 /* ApplicationFonts.swift */; }; 5BC2FEF61DF50C3900463413 /* ApplicationStyles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BC2FEF41DF50C3900463413 /* ApplicationStyles.swift */; }; - CCA01A142AD835D800B0CAB1 /* HandyText in Frameworks */ = {isa = PBXBuildFile; productRef = CCA01A132AD835D800B0CAB1 /* HandyText */; }; + CCA01A182AD8393E00B0CAB1 /* HandyText in Frameworks */ = {isa = PBXBuildFile; productRef = CCA01A172AD8393E00B0CAB1 /* HandyText */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -27,7 +27,7 @@ 5B31FAE81DF45BE900EC9D42 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 5BC2FEF31DF50C3900463413 /* ApplicationFonts.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ApplicationFonts.swift; sourceTree = ""; }; 5BC2FEF41DF50C3900463413 /* ApplicationStyles.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ApplicationStyles.swift; sourceTree = ""; }; - CCA01A112AD835B000B0CAB1 /* HandyText */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = HandyText; path = ../../HandyText; sourceTree = ""; }; + CCA01A162AD8393200B0CAB1 /* HandyText */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = HandyText; path = ../../..; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -35,7 +35,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - CCA01A142AD835D800B0CAB1 /* HandyText in Frameworks */, + CCA01A182AD8393E00B0CAB1 /* HandyText in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -45,7 +45,7 @@ 5B31FAD01DF45BE900EC9D42 = { isa = PBXGroup; children = ( - CCA01A112AD835B000B0CAB1 /* HandyText */, + CCA01A152AD8393200B0CAB1 /* Packages */, 5B31FADB1DF45BE900EC9D42 /* HandyTextExample */, 5B31FADA1DF45BE900EC9D42 /* Products */, CCA01A122AD835D800B0CAB1 /* Frameworks */, @@ -82,6 +82,14 @@ name = Frameworks; sourceTree = ""; }; + CCA01A152AD8393200B0CAB1 /* Packages */ = { + isa = PBXGroup; + children = ( + CCA01A162AD8393200B0CAB1 /* HandyText */, + ); + name = Packages; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -99,7 +107,7 @@ ); name = HandyTextExample; packageProductDependencies = ( - CCA01A132AD835D800B0CAB1 /* HandyText */, + CCA01A172AD8393E00B0CAB1 /* HandyText */, ); productName = HandyTextExample; productReference = 5B31FAD91DF45BE900EC9D42 /* HandyTextExample.app */; @@ -359,7 +367,7 @@ /* End XCConfigurationList section */ /* Begin XCSwiftPackageProductDependency section */ - CCA01A132AD835D800B0CAB1 /* HandyText */ = { + CCA01A172AD8393E00B0CAB1 /* HandyText */ = { isa = XCSwiftPackageProductDependency; productName = HandyText; }; diff --git a/Demo/HandyTextExample/HandyTextExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Sources/Demo/HandyTextExample/HandyTextExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from Demo/HandyTextExample/HandyTextExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Sources/Demo/HandyTextExample/HandyTextExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/Demo/HandyTextExample/HandyTextExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Sources/Demo/HandyTextExample/HandyTextExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from Demo/HandyTextExample/HandyTextExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Sources/Demo/HandyTextExample/HandyTextExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Demo/HandyTextExample/HandyTextExample/AppDelegate.swift b/Sources/Demo/HandyTextExample/HandyTextExample/AppDelegate.swift similarity index 100% rename from Demo/HandyTextExample/HandyTextExample/AppDelegate.swift rename to Sources/Demo/HandyTextExample/HandyTextExample/AppDelegate.swift diff --git a/Demo/HandyTextExample/HandyTextExample/ApplicationFonts.swift b/Sources/Demo/HandyTextExample/HandyTextExample/ApplicationFonts.swift similarity index 100% rename from Demo/HandyTextExample/HandyTextExample/ApplicationFonts.swift rename to Sources/Demo/HandyTextExample/HandyTextExample/ApplicationFonts.swift diff --git a/Demo/HandyTextExample/HandyTextExample/ApplicationStyles.swift b/Sources/Demo/HandyTextExample/HandyTextExample/ApplicationStyles.swift similarity index 100% rename from Demo/HandyTextExample/HandyTextExample/ApplicationStyles.swift rename to Sources/Demo/HandyTextExample/HandyTextExample/ApplicationStyles.swift diff --git a/Demo/HandyTextExample/HandyTextExample/Assets.xcassets/AppIcon.appiconset/Contents.json b/Sources/Demo/HandyTextExample/HandyTextExample/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Demo/HandyTextExample/HandyTextExample/Assets.xcassets/AppIcon.appiconset/Contents.json rename to Sources/Demo/HandyTextExample/HandyTextExample/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/Demo/HandyTextExample/HandyTextExample/Base.lproj/LaunchScreen.storyboard b/Sources/Demo/HandyTextExample/HandyTextExample/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from Demo/HandyTextExample/HandyTextExample/Base.lproj/LaunchScreen.storyboard rename to Sources/Demo/HandyTextExample/HandyTextExample/Base.lproj/LaunchScreen.storyboard diff --git a/Demo/HandyTextExample/HandyTextExample/Base.lproj/Main.storyboard b/Sources/Demo/HandyTextExample/HandyTextExample/Base.lproj/Main.storyboard similarity index 100% rename from Demo/HandyTextExample/HandyTextExample/Base.lproj/Main.storyboard rename to Sources/Demo/HandyTextExample/HandyTextExample/Base.lproj/Main.storyboard diff --git a/Demo/HandyTextExample/HandyTextExample/Info.plist b/Sources/Demo/HandyTextExample/HandyTextExample/Info.plist similarity index 100% rename from Demo/HandyTextExample/HandyTextExample/Info.plist rename to Sources/Demo/HandyTextExample/HandyTextExample/Info.plist diff --git a/Demo/HandyTextExample/HandyTextExample/ViewController.swift b/Sources/Demo/HandyTextExample/HandyTextExample/ViewController.swift similarity index 100% rename from Demo/HandyTextExample/HandyTextExample/ViewController.swift rename to Sources/Demo/HandyTextExample/HandyTextExample/ViewController.swift diff --git a/HandyText/Sources/HandyText/Font.swift b/Sources/HandyText/Font.swift similarity index 100% rename from HandyText/Sources/HandyText/Font.swift rename to Sources/HandyText/Font.swift diff --git a/HandyText/Sources/HandyText/NSAttributedString+TextStyle.swift b/Sources/HandyText/NSAttributedString+TextStyle.swift similarity index 100% rename from HandyText/Sources/HandyText/NSAttributedString+TextStyle.swift rename to Sources/HandyText/NSAttributedString+TextStyle.swift diff --git a/HandyText/Sources/HandyText/String+TagScheme.swift b/Sources/HandyText/String+TagScheme.swift similarity index 100% rename from HandyText/Sources/HandyText/String+TagScheme.swift rename to Sources/HandyText/String+TagScheme.swift diff --git a/HandyText/Sources/HandyText/String+TextStyle.swift b/Sources/HandyText/String+TextStyle.swift similarity index 100% rename from HandyText/Sources/HandyText/String+TextStyle.swift rename to Sources/HandyText/String+TextStyle.swift diff --git a/HandyText/Sources/HandyText/TagScheme.swift b/Sources/HandyText/TagScheme.swift similarity index 100% rename from HandyText/Sources/HandyText/TagScheme.swift rename to Sources/HandyText/TagScheme.swift diff --git a/HandyText/Sources/HandyText/TextStyle+Modifiers.swift b/Sources/HandyText/TextStyle+Modifiers.swift similarity index 100% rename from HandyText/Sources/HandyText/TextStyle+Modifiers.swift rename to Sources/HandyText/TextStyle+Modifiers.swift diff --git a/HandyText/Sources/HandyText/TextStyle.swift b/Sources/HandyText/TextStyle.swift similarity index 100% rename from HandyText/Sources/HandyText/TextStyle.swift rename to Sources/HandyText/TextStyle.swift diff --git a/HandyText/Sources/HandyText/TextStyleApplicable.swift b/Sources/HandyText/TextStyleApplicable.swift similarity index 100% rename from HandyText/Sources/HandyText/TextStyleApplicable.swift rename to Sources/HandyText/TextStyleApplicable.swift diff --git a/HandyText/Sources/HandyText/UIBarButtonItem+TextStyleApplicable.swift b/Sources/HandyText/UIBarButtonItem+TextStyleApplicable.swift similarity index 100% rename from HandyText/Sources/HandyText/UIBarButtonItem+TextStyleApplicable.swift rename to Sources/HandyText/UIBarButtonItem+TextStyleApplicable.swift diff --git a/HandyText/Sources/HandyText/UINavigationBar+TextStyle.swift b/Sources/HandyText/UINavigationBar+TextStyle.swift similarity index 100% rename from HandyText/Sources/HandyText/UINavigationBar+TextStyle.swift rename to Sources/HandyText/UINavigationBar+TextStyle.swift diff --git a/Tests/HandyTextTests/HandyTextTests.swift b/Tests/HandyTextTests/HandyTextTests.swift new file mode 100644 index 0000000..65139fa --- /dev/null +++ b/Tests/HandyTextTests/HandyTextTests.swift @@ -0,0 +1,8 @@ +import XCTest +@testable import HandyText + +final class HandyTextTests: XCTestCase { + func testExample() throws { + + } +} From e49044cf8683a6cf4bd572da2b0c46b5ed505a5d Mon Sep 17 00:00:00 2001 From: Boris Bugor Date: Fri, 13 Oct 2023 09:55:56 +0300 Subject: [PATCH 3/3] lower swift version --- .DS_Store | Bin 6148 -> 6148 bytes Package.swift | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.DS_Store b/.DS_Store index 0aefacfd4a655fb95e335576eaeb30a4c16c5adf..f193f9207def7ff2c33daea084c9d6219e4b3ec1 100644 GIT binary patch delta 315 zcmZoMXfc=|#>B)qu~2NHo}vgV0|Nsi1A_oVa!yiyeh!ewz`n6?1tTNtuu5=%;pof3xqpRo1r-iqFo;&CBlsIU48-pf|vP7fQpZ?#aJd z<)qjdf*JA|N*Rh6k{MDNipzqF@^bR?(t(OLi?V%U+}QAfX)`+qKL;>qHVblmXP(S2 R;>ZCq0%$DD<_M8B%mBl6QJnw) literal 6148 zcmeHKO-lnY5Ph)~t6qBW;4#0TOAA%JEv1476`|_cZo3p=b!EFnz3or;O%jV`Yr%_@ zG6OR&JDJJHOOrGJ%wRF?0&M^-s$lboW{pU_XifHl=YVKj8=tsGiVu{qwPnY zXImfR=Givz%r%)!=aVeS^Gtqz2VAJi4QU#ytUuO}d@1EN=s?Nl}FZ4j87%{R1=;U#;4P7 zLtGrN^61lH!sEk)o=te67}q=7w=Nte_NZ1FPzF{RX!y^z-2a!qzyDX0^h+5~26l=8 z(;SY515PR2t+mO?U2CaNR1t}*Jh~K`a2>mXT*aqUC#~g07 diff --git a/Package.swift b/Package.swift index 98b79ec..797cfaf 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 5.8 +// swift-tools-version: 5.5 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription