feature: support swift package manager #965
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
|||||||
.DS_STORE
|
.DS_STORE
|
||||||
|
|
||||||
|
*.xcodeproj
|
||||||
|
|
||||||
/buck-cache/
|
/buck-cache/
|
||||||
/buck-out/
|
/buck-out/
|
||||||
|
@@ -13,7 +13,7 @@ let package = Package(
|
|||||||
products: [
|
products: [
|
||||||
.library(
|
.library(
|
||||||
name: "YogaKit",
|
name: "YogaKit",
|
||||||
type: .static,
|
//type: .dynamic,
|
||||||
targets: ["YogaKit"]
|
targets: ["YogaKit"]
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@@ -22,7 +22,7 @@ let package = Package(
|
|||||||
.target(
|
.target(
|
||||||
name: "YogaKit",
|
name: "YogaKit",
|
||||||
path: "yoga",
|
path: "yoga",
|
||||||
exclude: [],
|
//exclude: [],
|
||||||
sources: ["./"],
|
sources: ["./"],
|
||||||
publicHeadersPath: "include",
|
publicHeadersPath: "include",
|
||||||
cSettings: [
|
cSettings: [
|
||||||
|
26
Playground.playground/Contents.swift
Normal file
26
Playground.playground/Contents.swift
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
//: A UIKit based Playground for presenting user interface
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
import PlaygroundSupport
|
||||||
|
import YogaKit
|
||||||
|
|
||||||
|
let globalConfig: YGConfigRef = YGConfigNew()
|
||||||
|
var node:YGNodeRef = YGNodeNewWithConfig(globalConfig)
|
||||||
|
|
||||||
|
|
||||||
|
class MyViewController : UIViewController {
|
||||||
|
override func loadView() {
|
||||||
|
let view = UIView()
|
||||||
|
view.backgroundColor = .white
|
||||||
|
|
||||||
|
let label = UILabel()
|
||||||
|
label.frame = CGRect(x: 150, y: 200, width: 200, height: 20)
|
||||||
|
label.text = "Hello World!"
|
||||||
|
label.textColor = .black
|
||||||
|
|
||||||
|
view.addSubview(label)
|
||||||
|
self.view = view
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Present the view controller in the Live View window
|
||||||
|
PlaygroundPage.current.liveView = MyViewController()
|
4
Playground.playground/contents.xcplayground
Normal file
4
Playground.playground/contents.xcplayground
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<playground version='5.0' target-platform='ios' executeOnSourceChanges='true'>
|
||||||
|
<timeline fileName='timeline.xctimeline'/>
|
||||||
|
</playground>
|
Reference in New Issue
Block a user