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 { |