Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
my189174944 committed Sep 26, 2021
0 parents commit 74f9105
Show file tree
Hide file tree
Showing 25 changed files with 1,325 additions and 0 deletions.
385 changes: 385 additions & 0 deletions test.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions test.xcodeproj/project.xcworkspace/contents.xcworkspacedata

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,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
uuid = "E93F744F-FC98-4E6F-8066-E72A5D5D5E94"
type = "1"
version = "2.0">
</Bucket>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>test.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
11 changes: 11 additions & 0 deletions test/Assets.xcassets/AccentColor.colorset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
98 changes: 98 additions & 0 deletions test/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"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" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
6 changes: 6 additions & 0 deletions test/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
38 changes: 38 additions & 0 deletions test/Assets.xcassets/bg.colorset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "0.000",
"red" : "0.000"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "0.488",
"red" : "1.000"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
24 changes: 24 additions & 0 deletions test/Assets.xcassets/logo.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"images" : [
{
"filename" : "Image.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "original"
}
}
Binary file added test/Assets.xcassets/logo.imageset/Image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
111 changes: 111 additions & 0 deletions test/ContentView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
//
// ContentView.swift
// test
//
// Created by interface on 2021/9/7.
//

import SwiftUI

struct ContentView: View {

@State private var fullText: String = "This is some editable text..."
@State private var speed = 50.0
@State private var isEditing = false
@State private var bbb:Float=80.0

var body: some View {
if UIDevice.current.userInterfaceIdiom == .pad{
NavigationView(content: {
List {
NavigationLink(destination: Text("hello world")) {
Text("首页")
}
NavigationLink(destination: Text("hello world1")) {
Text("爱好")
}
NavigationLink(destination: Text("hello world23")) {
Text("我的")
}
}.navigationBarTitle(Text("ContentView"))
// StackNavigationViewStyle()
// DoubleColumnNavigationViewStyle()
}).navigationViewStyle(DoubleColumnNavigationViewStyle())
}else{
NavigationView(content: {
TabView {
Home1().tabItem {
Image(systemName: "house.fill")
Text("首页")
}.navigationTitle("").navigationBarHidden(true)
Home2().tabItem {
Image(systemName: "heart.circle.fill")
Text("爱好")
}.navigationTitle("").navigationBarHidden(true)
Home3().tabItem {
Image(systemName: "person.fill")
Text("我的")
}.navigationTitle("").navigationBarHidden(true)
}
.font(.headline).accentColor(Color.pink)
}).navigationTitle("").navigationBarHidden(true)
}
}
}

struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}

struct SubView:View {
@Binding var title:String
var body: some View{
Text(title)
}
}

struct Contact: Identifiable {
var id = UUID()
var name: String
var number: String
}




struct MyButton:View {
var body:some View{
Button("Press Me") {
print("Button pressed!")
}.foregroundColor(Color.white)
.padding()
.background(Color(red: 0, green: 0, blue: 0.5))
.clipShape(Capsule())
}
}


struct geometryReaderView: View {
var body: some View {
GeometryReader { geometry in
VStack {
// 2.
Text("One")
.frame(width: geometry.size.width, height: geometry.size.height/2)
.background(Color.red)

HStack {
// 3.
Text("Two")
.frame(width: geometry.size.width/2, height: geometry.size.height/2)
.background(Color.blue)
Text("Three")
.frame(width: geometry.size.width/2, height: geometry.size.height/2)
.background(Color.yellow)
}
}
}
}
}
Loading

0 comments on commit 74f9105

Please sign in to comment.