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
// | |
// ViewController.swift | |
// SampleObserve | |
// | |
// Created by 永田大祐 on 2019/11/12. | |
// Copyright © 2019 永田大祐. All rights reserved. | |
// | |
import UIKit |
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 var text: String = "" | |
@State var text2: String = "" | |
@State var spacing: CGFloat = 0 | |
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 UIKit | |
import SwiftUI | |
struct ContentView: View { | |
@State var text: String = "" | |
@State var text2: String = "" | |
@State var spacing: CGFloat = 0 |
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 UIKit | |
final class UnderLineTextField: UITextField { | |
private var border: CALayer | |
override init(frame: CGRect) { | |
border = CALayer() | |
super.init(frame: .zero) | |
} |
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 { | |
let first = Restaurant(id: 0, name: "0") | |
let second = Restaurant(id: 1, name: "1") | |
let third = Restaurant(id: 2, name: "2") | |
let restaurants = [first, second, third] |
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 viewModel = OrientationModel() | |
let cardView = CardView(card: Card.example) | |
var body: some View { | |
ScrollView(.horizontal) { | |
HStack(spacing: 0) { |
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 Combine | |
import SwiftUI | |
struct ContentView: View { | |
@ObservedObject var viewModel = OrientationModel() | |
var body: some View { | |
let first = Restaurant(id: 0 ,score: 0.0, login: "a") | |
let second = Restaurant(id: 1 ,score: 0.0, login: "b") | |
let third = Restaurant(id: 2 ,score: 0.0, login: "c") |
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
public struct ItemUniqueID: Hashable | |
{ | |
var sectionIDHash: Int | |
var itemIDHash: Int | |
init<SectionID: Hashable, ItemID: Hashable>(sectionID: SectionID, itemID: ItemID) | |
{ | |
sectionIDHash = sectionID.hashValue | |
itemIDHash = itemID.hashValue | |
} | |
} |
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 { | |
Text("Hello").modifier(MyModifier(color: .yellow, | |
frameSize: 100, // frmae is size | |
verticalSet: .top, // originY | |
horizontalSet: .trailing, // originX | |
verticalSize: 100, // originY size | |
horizontalSize: 100)) // originX size |
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 Event: Identifiable { | |
let id: Int | |
let name: String | |
let emoji: String | |
let color: Color | |
} | |
struct ContentView : View { |