This file contains hidden or 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
// | |
// BottomSheet.swift | |
// Squirrel-SwiftUI | |
// | |
// Created by Amritpal Singh on 24/05/20. | |
// Copyright © 2020 sidhu.com. All rights reserved. | |
// | |
import SwiftUI |
This file contains hidden or 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 Combine | |
enum ErrorType { | |
case badRequest, authError, outdatedError, undefined | |
} | |
struct APIError: Error { | |
let statusCode: Int | |
var errorDescription: ErrorType { | |
switch statusCode { |
This file contains hidden or 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
extension View { | |
public func textFieldFocusableArea() -> some View { | |
TextFieldButton { self.contentShape(Rectangle()) } | |
} | |
} | |
fileprivate struct TextFieldButton<Label: View>: View { | |
init(label: @escaping () -> Label) { | |
self.label = label | |
} |
This file contains hidden or 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
// | |
// 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 |
This file contains hidden or 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 | |
extension View { | |
func eraseToAnyView() -> AnyView { | |
AnyView(self) | |
} | |
} | |
struct SizePreferenceKey: PreferenceKey { | |
typealias Value = CGSize |
This file contains hidden or 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 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 } |
This file contains hidden or 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
/ | |
// APIManager.swift | |
// iOSDuComm | |
// | |
// Created by Sufian on 20/6/19. | |
// Copyright © 2019 Abu Sufian. All rights reserved. | |
// | |
import UIKit | |
import Alamofire |
This file contains hidden or 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 | |
// newUI | |
// | |
// Created by prafull kumar on 3/4/20. | |
// Copyright © 2020 prafull kumar. All rights reserved. | |
// | |
import SwiftUI |
This file contains hidden or 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
# ~/.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 |
This file contains hidden or 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
cap staging deploy:check | |
cap staging deploy |