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
public final class CustomHostingController<Content>: UIHostingController<Content> where Content: 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
import Foundation | |
import Network | |
final class Reachability: ObservableObject { | |
// MARK: Enum | |
enum NetworkStatus: String { | |
case connected | |
case disconnected |
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
private func confirmPayment() { | |
let securitymanager = MPSecurityManager(flowUsageDescription: "Para realizar un par seguro") | |
securitymanager.authorize(onSuccess: { | |
// Payment success | |
self.doPayment() | |
}) { _ in | |
// TODO: Error - Log | |
} |
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 JSRemoteImage: View { | |
@State private var uiImage: UIImage = UIImage() | |
@ObjectBinding private var remoteImageHandler: JSRemoteImageHandler | |
init(_ remoteUrl: String?) { | |
remoteImageHandler = JSRemoteImageHandler(remoteUrl) | |
} | |
var body: some View { | |
Image(uiImage: getImage()).resizable() |
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
// | |
// JSRemoteImage.swift | |
// Ridit | |
// | |
// Created by Juan Sebastian Sanzone on 6/29/19. | |
// Copyright © 2019 JuanSanzone. All rights reserved. | |
// | |
import SwiftUI | |
import Combine |
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
// | |
// JSRemoteImage.swift | |
// Ridit App | |
// | |
// Created by Juan Sebastian Sanzone on 6/24/19. | |
// Copyright © 2019 @johnsanzo. All rights reserved. | |
// | |
import SwiftUI |
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
// | |
// InstaStories.swift | |
// SwiftUITests | |
// | |
// Created by Fabio Giolito on 23/06/2019. | |
// Copyright © 2019 Fabio Giolito. All rights reserved. | |
// | |
import Combine | |
import SwiftUI |
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 { | |
List { | |
HeaderView() | |
ForEach(0...20) { n in | |
Text("Row #\(n)") | |
} | |
} |
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 SDWebImage | |
// ... | |
func fetchWeatherImage() -> Image { | |
let imageFileName = weather.iconUrl ?? "01d" | |
let uiImageView = UIImageView() | |
uiImageView.sd_setImage(with: URL(string: "https://path/\(imageFileName).png"), completed: nil) | |
if let image = uiImageView.image { |