-
-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ⚡ WIP * 🌲 Update * 🌲 Update * 🌲 Update * 🌲 Update * Update Package.swift * Update README.md * Update ci.yml * Remove gif * Resolve packages * 🌲 Update * 🌲 Update * 🌲 Update
- Loading branch information
Showing
28 changed files
with
1,271 additions
and
932 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,9 @@ jobs: | |
test: | ||
runs-on: macos-11 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: set -o pipefail && xcodebuild build -project NextGrowingTextView.xcodeproj -scheme NextGrowingTextView -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty | ||
- run: pod lib lint | ||
- uses: maxim-lobanov/[email protected] | ||
with: | ||
xcode-version: "13.2" | ||
- uses: actions/checkout@v2 | ||
# - run: set -o pipefail && xcodebuild build -project NextGrowingTextView.xcodeproj -scheme NextGrowingTextView -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty | ||
- run: pod lib lint --allow-warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
|
||
# Xcode | ||
build/ | ||
.build | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import UIKit | ||
|
||
import MondrianLayout | ||
import CompositionKit | ||
import NextGrowingTextView | ||
import TypedTextAttributes | ||
|
||
@UIApplicationMain | ||
class AppDelegate: UIResponder, UIApplicationDelegate { | ||
|
||
var window: UIWindow? | ||
|
||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | ||
|
||
let newWindow = UIWindow() | ||
newWindow.rootViewController = RootContainerViewController() | ||
newWindow.makeKeyAndVisible() | ||
self.window = newWindow | ||
return true | ||
} | ||
|
||
} |
53 changes: 53 additions & 0 deletions
53
NextGrowingTextView-Demo/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "20x20" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "20x20" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "29x29" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "29x29" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "40x40" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "40x40" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "60x60" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "60x60" | ||
}, | ||
{ | ||
"idiom" : "ios-marketing", | ||
"scale" : "1x", | ||
"size" : "1024x1024" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
|
||
import StorybookKit | ||
import NextGrowingTextView | ||
import UIKit | ||
import MondrianLayout | ||
|
||
let book = Book(title: "NextGrowingTextView") { | ||
|
||
BookPush(title: "Flexible Width") { | ||
FlexibleWidthCenteringViewController() | ||
} | ||
|
||
BookPush(title: "Fixed Width") { | ||
FixedWidthViewController() | ||
} | ||
|
||
} | ||
|
||
|
||
func makeControlPanel(for growingTextView: NextGrowingTextView) -> UIView { | ||
|
||
let view = UIView() | ||
|
||
Mondrian.buildSubviews(on: view) { | ||
|
||
VGridBlock(columns: [ | ||
.init(.flexible(), spacing: 10), | ||
.init(.flexible(), spacing: 10), | ||
]) { | ||
|
||
UIButton.make(title: "Set text") { | ||
growingTextView.textView.text = BookGenerator.loremIpsum(length: 300) | ||
} | ||
|
||
UIButton.make(title: "Clear text") { | ||
growingTextView.textView.text = "" | ||
} | ||
|
||
UIButton.make(title: "Max = 3") { | ||
growingTextView.configuration.maxLines = 3 | ||
} | ||
|
||
UIButton.make(title: "Max = 10") { | ||
growingTextView.configuration.maxLines = 10 | ||
} | ||
|
||
UIButton.make(title: "Min = 1") { | ||
growingTextView.configuration.minLines = 1 | ||
} | ||
|
||
UIButton.make(title: "Min = 5") { | ||
growingTextView.configuration.minLines = 5 | ||
} | ||
} | ||
|
||
} | ||
|
||
return view | ||
|
||
} |
Oops, something went wrong.