Skip to content

Commit

Permalink
Update Package.swift (#10)
Browse files Browse the repository at this point in the history
* Patch

* 🌲 Update
  • Loading branch information
muukii authored Sep 8, 2023
1 parent 8a6397c commit 4383f8a
Show file tree
Hide file tree
Showing 33 changed files with 315 additions and 715 deletions.
1 change: 0 additions & 1 deletion Cartfile

This file was deleted.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"pins" : [
{
"identity" : "descriptors",
"kind" : "remoteSourceControl",
"location" : "https://github.com/FluidGroup/Descriptors",
"state" : {
"revision" : "f41ce2605a76c5d378fe8c5e8c5c98b544dfd108",
"version" : "0.2.3"
}
},
{
"identity" : "mondrianlayout",
"kind" : "remoteSourceControl",
"location" : "https://github.com/FluidGroup/MondrianLayout.git",
"state" : {
"revision" : "5f00b13984fe08316fc5b5be06e2f41c14a3befa",
"version" : "0.10.0"
}
},
{
"identity" : "stackscrollview",
"kind" : "remoteSourceControl",
"location" : "https://github.com/FluidGroup/StackScrollView",
"state" : {
"revision" : "c7d2950cdaee7f4aa0dfd1a1364d352f841c9954",
"version" : "1.6.3"
}
},
{
"identity" : "texture",
"kind" : "remoteSourceControl",
"location" : "https://github.com/FluidGroup/Texture.git",
"state" : {
"revision" : "68df47f0d26522da76b06f22e9a97e4d4ab58dad",
"version" : "3.0.2"
}
},
{
"identity" : "textureswiftsupport",
"kind" : "remoteSourceControl",
"location" : "https://github.com/FluidGroup/TextureSwiftSupport",
"state" : {
"revision" : "fb748d6a9d0a2dca0635227e1db0360fd26e0e24",
"version" : "3.20.1"
}
},
{
"identity" : "typedtextattributes",
"kind" : "remoteSourceControl",
"location" : "https://github.com/muukii/TypedTextAttributes.git",
"state" : {
"revision" : "22aadd76b1cfe7a0702200990c9c5b8f4d33a912",
"version" : "1.5.0"
}
}
],
"version" : 2
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import UIKit

import EasyPeasy
import MondrianLayout
import TextureBridging
import AsyncDisplayKit
import TypedTextAttributes
Expand All @@ -26,19 +26,14 @@ final class BridgeToAutoLayoutViewController : UIViewController {
view.backgroundColor = .white
view.addSubview(changeTextButton)
view.addSubview(nodeView)

changeTextButton.easy.layout([
CenterX(),
Bottom(32).to(view.safeAreaLayoutGuide, .bottom)
])

nodeView.easy.layout([
Top(32).to(view.safeAreaLayoutGuide, .top),
CenterX(),
Left(>=32),
Right(<=32),
Bottom(<=0).to(changeTextButton, .top),
])

Mondrian.buildSubviews(on: view) {
VStackBlock {
nodeView
changeTextButton
}
.container(respectingSafeAreaEdges: .all)
}

changeTextButton.addTarget(self, action: #selector(didTap), for: .touchUpInside)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

import UIKit

import MondrianLayout
import AsyncDisplayKit
import TextureBridging
import EasyPeasy

final class DemoImageViewController: UIViewController {

Expand All @@ -25,10 +25,14 @@ final class DemoImageViewController: UIViewController {

view.addSubview(imageView)
view.addSubview(button)

imageView.easy.layout(Center())

button.easy.layout([CenterX(), Bottom(40)])

Mondrian.buildSubviews(on: view) {
VStackBlock {
imageView
button
}
.container(respectingSafeAreaEdges: .all)
}

button.addTarget(self, action: #selector(tap), for: .touchUpInside)
}
Expand Down
125 changes: 125 additions & 0 deletions Development/TextureBridgingDemo/DemoStackScrollViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
//
// DemoStackScrollViewController.swift
// TextureBridgingDemo
//
// Created by muukii on 2020/06/09.
// Copyright © 2020 muukii. All rights reserved.
//

import Foundation
import MondrianLayout
import StackScrollView
import TextureSwiftSupport
import TextureBridging

final class DemoStackScrollViewController: UIViewController {

private let stackScrollView = StackScrollView()

override func viewDidLoad() {
super.viewDidLoad()

view.addSubview(stackScrollView)

Mondrian.buildSubviews(on: view) {
ZStackBlock(alignment: .attach(.all)) {
stackScrollView
}
}

stackScrollView.append(view: NodeView(node: Component()))
stackScrollView.append(view: NodeView(node: FlexWrapComponent()))
}
}

extension DemoStackScrollViewController {

final class Component: ASDisplayNode {

private let textNode = ASTextNode()

override init() {
super.init()

automaticallyManagesSubnodes = true

backgroundColor = .orange

textNode.attributedText = NSAttributedString(string: """
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
""")
}

override func layoutSpecThatFits(_ constrainedSize: ASSizeRange) -> ASLayoutSpec {
LayoutSpec {
textNode
}
}

}

final class FlexWrapComponent: ASDisplayNode {

private let nodes: [ASTextNode]

override init() {

let nodes = (0..<30).map { i -> ASTextNode in
let text = ASTextNode()
text.attributedText = NSAttributedString(string: "Hello")
return text
}

self.nodes = nodes

super.init()

backgroundColor = .red

automaticallyManagesSubnodes = true

}

override func layoutSpecThatFits(_ constrainedSize: ASSizeRange) -> ASLayoutSpec {
LayoutSpec {
HStackLayout(spacing: 0, justifyContent: .start, alignItems: .center, flexWrap: .wrap(lineSpacing: 10, alignContent: .start), isConcurrent: false) {
nodes
}
}
}

}

final class HorizontalNoWrapComponent: ASDisplayNode {

private let nodes: [ASTextNode]

override init() {

let nodes = (0..<30).map { i -> ASTextNode in
let text = ASTextNode()
text.attributedText = NSAttributedString(string: "Hello")
return text
}

self.nodes = nodes

super.init()

backgroundColor = .orange

automaticallyManagesSubnodes = true

}

override func layoutSpecThatFits(_ constrainedSize: ASSizeRange) -> ASLayoutSpec {
LayoutSpec {
HStackLayout(spacing: 0, justifyContent: .start, alignItems: .center, flexWrap: .wrap(lineSpacing: 10, alignContent: .start), isConcurrent: false) {
nodes
}
}
}

}

}
File renamed without changes.
File renamed without changes.
49 changes: 2 additions & 47 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,57 +1,12 @@
{
"pins" : [
{
"identity" : "iglistkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/3a4oT/IGListKit",
"state" : {
"branch" : "spmNumber10",
"revision" : "979eca9b2da15e35af36f4613452dd6e07641969"
}
},
{
"identity" : "libwebp-xcode",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SDWebImage/libwebp-Xcode",
"state" : {
"revision" : "2b3b43faaef54d1b897482428428357b7f7cd08b",
"version" : "1.2.1"
}
},
{
"identity" : "pincache",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pinterest/PINCache.git",
"state" : {
"revision" : "875c654984fb52b47ca65ae70d24852b0003ccd9",
"version" : "3.0.3"
}
},
{
"identity" : "pinoperation",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pinterest/PINOperation.git",
"state" : {
"revision" : "44d8ca154a4e75a028a5548c31ff3a53b90cef15",
"version" : "1.2.1"
}
},
{
"identity" : "pinremoteimage",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pinterest/PINRemoteImage.git",
"state" : {
"branch" : "master",
"revision" : "18637e4414d77fbc95cd7d499179a9880e9a78d8"
}
},
{
"identity" : "texture",
"kind" : "remoteSourceControl",
"location" : "https://github.com/FluidGroup/Texture.git",
"state" : {
"branch" : "spm",
"revision" : "5d03875bcfb0d87f8057ebeb5f2f6e4527e18128"
"revision" : "68df47f0d26522da76b06f22e9a97e4d4ab58dad",
"version" : "3.0.2"
}
}
],
Expand Down
9 changes: 4 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,20 @@ import PackageDescription
let package = Package(
name: "TextureBridging",
platforms: [
.iOS(.v11),
.iOS(.v13),
],
products: [
.library(name: "TextureBridging", targets: ["TextureBridging"]),
],
dependencies: [
.package(url: "https://github.com/FluidGroup/Texture.git", branch: "spm"),
.package(url: "https://github.com/FluidGroup/Texture.git", from: "3.0.2"),
],
targets: [
.target(
name: "TextureBridging",
name: "TextureBridging",
dependencies: [
.product(name: "AsyncDisplayKit", package: "Texture"),
],
path: "TextureBridging"
]
),
],
swiftLanguageVersions: [.v5]
Expand Down
18 changes: 0 additions & 18 deletions Podfile

This file was deleted.

Loading

0 comments on commit 4383f8a

Please sign in to comment.