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
🌞 Morning 93 commits █░░░░░░░░░░░░░░░░░░░░ 4.8% | |
🌆 Daytime 845 commits █████████▏░░░░░░░░░░░ 43.8% | |
🌃 Evening 781 commits ████████▌░░░░░░░░░░░░ 40.5% | |
🌙 Night 210 commits ██▎░░░░░░░░░░░░░░░░░░ 10.9% |
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 selectedIndex: Int? = nil | |
let options: [String] = ["Option1", "Option2"] | |
var body: some View { | |
PickerField("Select an option", data: self.options, selectionIndex: self.$selectedIndex) | |
} | |
} |
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 { | |
NavigationLink(destination: ChildView()) { Text("Child View") } | |
.isDetailLink(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
struct MyTextView: UIViewRepresentable { | |
@Binding var text: String | |
init(text: Binding<String>) { | |
self._text = text | |
} | |
func makeUIView(context: UIViewRepresentableContext<MyTextView>) -> UITextView { | |
let textView = UITextView(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
struct TextEditorPlaceHolder: View { | |
@State private var text: String = "" | |
private let screenWidth = UIScreen.main.bounds.width | |
var body: some View { | |
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 ContentView: View { | |
@State var text = "Placeholder" | |
var body: some View { | |
TextEditor(text: self.$text) | |
.foregroundColor(self.text == "Placeholder" ? .gray : .primary) | |
.onAppear { | |
NotificationCenter.default.addObserver(forName: UIResponder.keyboardWillShowNotification, object: nil, queue: .main) { (noti) 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 | |
import PhotosUI | |
struct ImagePickerView: UIViewControllerRepresentable { | |
let numOfSelectedPictures: Int // This is the number of selected photos | |
@Binding var images: [UIImage] | |
init(numOfSelectedPictures: Int, images: Binding<[UIImage]>) { | |
self.numOfSelectedPictures = numOfSelectedPictures |
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 PhotosUI | |
struct ImagePickerView: UIViewControllerRepresentable { | |
@Binding var image: UIImage | |
init(image: Binding<UIImage>) { | |
self._image = image | |
} |
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
// MARK: - Modifier | |
/// Choosable Sheet for FullScreen or Sheet Modal | |
struct ChooseableSheet<Destination>: ViewModifier where Destination: View { | |
// Select it's fullscreen sheet or modal sheet | |
@Binding var isFullScreen: Bool | |
@Binding var isPresented: Bool | |
private let fullScreenContent: () -> Destination? |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
OlderNewer