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 WhatNotView< | |
OffCircleContent: View, | |
OnCircleContent: View, | |
OffTrailingContent: View, | |
OnTrailingContent: View | |
>: View { | |
@State var toggle: Bool = false | |
@ScaledMetric var scale: CGFloat = 1 |
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 Foundation | |
import AppIntents | |
public struct CoffeePropertyQuery: EntityPropertyQuery { | |
public init() { } | |
public func entities(for identifiers: [Coffee.ID]) async throws -> [Coffee] { | |
Coffee.all.filter({ identifiers.contains($0.id) }) | |
} |
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 | |
import Combine | |
import ComposableArchitecture | |
struct AppState: Equatable { | |
var count = 0 | |
} | |
enum AppAction: Equatable { | |
case decrementButtonTapped | |
case incrementButtonTapped |
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 | |
// Searchable | |
// | |
// Created by Alex Logan on 27/06/2021. | |
// | |
import SwiftUI | |
struct Coffee: Hashable { |
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 Coffee: Hashable { | |
let name: String | |
} | |
class CoffeeStore: ObservableObject { | |
func getCoffee() async -> [Coffee] { | |
Thread.sleep(forTimeInterval: 2) | |
return [ | |
Coffee(name: "Cortado"), | |
Coffee(name: "Flat White") |
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
// | |
// WelcomeView.swift | |
// iOS | |
// | |
// Created by Alex Logan on 30/08/2020. | |
// | |
import SwiftUI | |
struct WelcomeView: 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
// Container View | |
struct SomeView: View { | |
var body: some View { | |
VStack { | |
Text("Welcome to our SwiftUI app") | |
.companyStyled() | |
FeaturedContentView() | |
ArticlesScrollView() | |
FooterView() | |
} |
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
// Container View | |
struct SomeView: View { | |
var body: some View { | |
VStack { | |
Text("Welcome to our SwiftUI app") | |
.modifier(CompanyHeaderLabel()) | |
FeaturedContentView() | |
ArticlesScrollView() | |
FooterView() | |
} |
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
// Container View | |
struct SomeView: View { | |
var body: some View { | |
VStack { | |
Text("Welcome to our SwiftUI app") | |
.font(.custom("Montserrat-Bold", size: 16)) | |
.foregroundColor(.textBlack) | |
.padding() | |
FeaturedContentView() | |
ArticlesScrollView() |
NewerOlder