Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #39 from hainayanda/line-break-mode
Browse files Browse the repository at this point in the history
Line break mode
  • Loading branch information
hainayanda authored Jul 23, 2023
2 parents fb4a3d4 + 5bf7f89 commit df01415
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Draftsman.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'Draftsman'
s.version = '3.2.3'
s.version = '3.2.4'
s.summary = 'Draftsman is a DSL framework for Swift'

# This description is used to generate tags and improve search results.
Expand Down
7 changes: 7 additions & 0 deletions Draftsman/Classes/Utilities/Shortcuts/Property/UILabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,12 @@ extension LayoutDraft where View: UILabel {
@inlinable public func preferredMaxLayoutWidth<P: Publisher>(assignedBy publisher: P) -> LayoutDraftSubscriber<View> where P.Output == CGFloat, P.Failure == Never {
self.subcriber.preferredMaxLayoutWidth(publisher)
}
@inlinable public func lineBreakMode(_ lineBreakMode: NSLineBreakMode) -> LayoutDraft<View> {
underlyingView.lineBreakMode = lineBreakMode
return self
}
@inlinable public func lineBreakMode<P: Publisher>(assignedBy publisher: P) -> LayoutDraftSubscriber<View> where P.Output == NSLineBreakMode, P.Failure == Never {
self.subcriber.lineBreakMode(publisher)
}
}
#endif
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ Draftsman is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'Draftsman', '~> 3.2.2'
pod 'Draftsman', '~> 3.2.4'
```

### Swift Package Manager from XCode

- Add it using XCode menu **File > Swift Package > Add Package Dependency**
- Add **<https://github.com/hainayanda/Draftsman.git>** as Swift Package URL
- Set rules at **version**, with **Up to Next Major** option and put **3.2.2** as its version
- Set rules at **version**, with **Up to Next Major** option and put **3.2.4** as its version
- Click next and wait

### Swift Package Manager from Package.swift
Expand All @@ -52,7 +52,7 @@ Add as your target dependency in **Package.swift**

```swift
dependencies: [
.package(url: "https://github.com/hainayanda/Draftsman.git", .upToNextMajor(from: "3.2.2"))
.package(url: "https://github.com/hainayanda/Draftsman.git", .upToNextMajor(from: "3.2.4"))
]
```

Expand Down

0 comments on commit df01415

Please sign in to comment.