comparison Simoleon/Helpers/ConditionalWrapper.swift @ 21:c3dda63f50ed v1.1

Added Core Data and UI changes - Implement Watchlist - Change conversion design - Improve UX
author Dennis Concepción Martín <dennisconcepcionmartin@gmail.com>
date Mon, 19 Jul 2021 19:27:12 +0100
parents
children 75c1a05176f6
comparison
equal deleted inserted replaced
20:f8aabe5b7251 21:c3dda63f50ed
1 //
2 // ConditionalWrapper.swift
3 // Simoleon
4 //
5 // Created by Dennis Concepción Martín on 19/07/2021.
6 //
7
8 import SwiftUI
9
10 extension View {
11 @ViewBuilder
12 func `if`<Content: View>(_ conditional: Bool, content: (Self) -> Content) -> some View {
13 if conditional {
14 content(self)
15 } else {
16 self
17 }
18 }
19 }