Snippets for my iOS Projects :D
- File Location for:
- User Defaults
extension View { | |
public func textFieldFocusableArea() -> some View { | |
TextFieldButton { self.contentShape(Rectangle()) } | |
} | |
} | |
fileprivate struct TextFieldButton<Label: View>: View { | |
init(label: @escaping () -> Label) { | |
self.label = label | |
} |
// | |
// GeocoderService.swift | |
// myGeocoding | |
// | |
// Created by Miharu Naruse on 2020/05/20. | |
// Copyright © 2020 Miharu Naruse. All rights reserved. | |
// | |
// https://developer.apple.com/documentation/corelocation/converting_between_coordinates_and_user-friendly_place_names | |
// https://developer.apple.com/documentation/corelocation/clplacemark | |
// https://developer.apple.com/documentation/corelocation/clgeocoder |
import SwiftUI | |
extension View { | |
func eraseToAnyView() -> AnyView { | |
AnyView(self) | |
} | |
} | |
struct SizePreferenceKey: PreferenceKey { | |
typealias Value = CGSize |
import Foundation | |
import SwiftUI | |
import Combine | |
class HttpAuth: ObservableObject { | |
@Published var authenticated = false | |
func postAuth(username: String, password: String) { | |
guard let url = URL(string: "http://mysite/login") else { return } |
/ | |
// APIManager.swift | |
// iOSDuComm | |
// | |
// Created by Sufian on 20/6/19. | |
// Copyright © 2019 Abu Sufian. All rights reserved. | |
// | |
import UIKit | |
import Alamofire |
// | |
// ContentView.swift | |
// newUI | |
// | |
// Created by prafull kumar on 3/4/20. | |
// Copyright © 2020 prafull kumar. All rights reserved. | |
// | |
import SwiftUI |
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
cap staging deploy:check | |
cap staging deploy |
/* | |
It's now a package. You can find it here: | |
https://github.com/joshnuss/svelte-local-storage-store | |
*/ | |
// Svelte store backed by window.localStorage | |
// Persists store's data locally |
Snippets for my iOS Projects :D