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
import SwiftUI | |
class ViewRouter: ObservableObject { @Published var iconName = "arrow.up.right.video.fill" } | |
struct ContentView: View { | |
@ObservedObject var viewRouter = ViewRouter() | |
@State private var selection: Int = 1 | |
var body: some View { |
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
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
GeometryReader { geometry in | |
Text("123") | |
.frame(width: geometry.size.width, height: geometry.size.height, alignment: .center) | |
.background(self.safeArea(geometry) ? Color.green:Color.red) | |
.onAppear { | |
self.allSafeArea(geometry)?.compactMap { m in |
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
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
Path { path in | |
path.move(to: CGPoint(x: 45, y: 250)) | |
path.addArc(center: CGPoint(x: 50,y: 250), radius: 5, startAngle: Angle(degrees: 0), endAngle: Angle(degrees: 360),clockwise: false) | |
path.addLine(to: CGPoint(x: 100, y: 200)) | |
path.addArc(center: CGPoint(x: 100,y: 200), radius: 5, startAngle: Angle(degrees: 0), endAngle: Angle(degrees: 360),clockwise: false) |
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
import SwiftUI | |
class ViewRouter: ObservableObject { | |
@Published var currentView = "clock.fill" | |
@Published var flg = false | |
} | |
struct ContentView: View { | |
@ObservedObject var viewRouter = ViewRouter() |
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
import SwiftUI | |
struct ContentView: View { | |
@State private var text = "" | |
@State private var evnent = HorizontalEvent(forEachCount: 1) | |
var body: some View { | |
ZStack { | |
HorizontalScrollView(event: self.evnent, action: { tex in |
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
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
NavigationView { | |
VStack { | |
Text("Hello, World!") | |
CommonButton(0) | |
} | |
.background(Color.blue) |
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
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
GeometryReader { geometry in | |
NavigationView { | |
ZStack { | |
VStack { | |
Text("Something") | |
.modifier(MyModifier(color: .yellow, |
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
// | |
// ContentView.swift | |
// SwiftUI_PickerandTimer | |
// | |
// Created by 永田大祐 on 2020/03/15. | |
// Copyright © 2020 永田大祐. All rights reserved. | |
// | |
import SwiftUI |
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
import SwiftUI | |
struct ContentView: View { | |
@ObservedObject var viewRouter = ViewRouter() | |
@State private var selection: Int = 1 | |
var body: some View { | |
GeometryReader { geometry in | |
VStack { |
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
struct AlertChoiceView: View { | |
@State private var offSet: CGFloat = UIScreen.main.bounds.height/2 | |
@State private var selection: Int = 1 | |
@ObservedObject var viewRouter = ViewRouter() | |
@State private var edge: Edge = Edge.bottom | |
// 画面の閉じる判定 | |
var body: some View { | |
GeometryReader { geometry in |