All Projects → RuiAAPeres → Tangerine

RuiAAPeres / Tangerine

Swift µframework for fetching images 🍊

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Tangerine

Qmui ios
QMUI iOS——致力于提高项目 UI 开发效率的解决方案
Stars: ✭ 6,433 (+4217.45%)
Mutual labels:  uikit, ios-ui
Ppasyncdrawingkit
This is a iOS asynchronously drawing view Kit.
Stars: ✭ 205 (+37.58%)
Mutual labels:  uikit, ios-ui
Qmuidemo ios
Sample Code for QMUI iOS
Stars: ✭ 912 (+512.08%)
Mutual labels:  uikit, ios-ui
My flutter challenges
Flutter project containing all my flutter UI challenges
Stars: ✭ 563 (+277.85%)
Mutual labels:  uikit, ios-ui
Aiolos
A floating panel for your iOS Apps
Stars: ✭ 1,544 (+936.24%)
Mutual labels:  uikit, ios-ui
Drawer View
📤 Custom UI component for iOS, replication of Apple's Apple Music player and Shortcuts’ components view [Swift 5.0, iOS 12].
Stars: ✭ 136 (-8.72%)
Mutual labels:  uikit
Material
A lightweight Material Design library for Angular based on Google's Material Components for the Web.
Stars: ✭ 143 (-4.03%)
Mutual labels:  uikit
Messageviewcontroller
A SlackTextViewController replacement written in Swift for the iPhone X.
Stars: ✭ 1,668 (+1019.46%)
Mutual labels:  uikit
Uikitswiftdsl
Swift DSL for UIKit
Stars: ✭ 134 (-10.07%)
Mutual labels:  uikit
Tjpyingke
仿写映客直播,目前已完成部分功能,后续会继续完善 ----[最新添加礼物列表及礼物动画]
Stars: ✭ 146 (-2.01%)
Mutual labels:  uikit
Notus Svelte
Notus Svelte: Free Tailwind CSS UI Kit and Admin
Stars: ✭ 144 (-3.36%)
Mutual labels:  uikit
Instagramactivityindicator
Activity Indicator similar to Instagram's.
Stars: ✭ 138 (-7.38%)
Mutual labels:  uikit
Shards Ui
🎨Shards is a beautiful & modern Bootstrap 4 UI kit packed with extra templates and components.
Stars: ✭ 1,718 (+1053.02%)
Mutual labels:  uikit
Hana Ui
🌻A react UIKit with nijigen style.
Stars: ✭ 144 (-3.36%)
Mutual labels:  uikit
Centroui
CentroUI is a library for building user interfaces for WebVR
Stars: ✭ 135 (-9.4%)
Mutual labels:  uikit
Eureka
Elegant iOS form builder in Swift
Stars: ✭ 11,345 (+7514.09%)
Mutual labels:  ios-ui
Bartinter
Dynamically changes status bar style depending on content behind it
Stars: ✭ 1,687 (+1032.21%)
Mutual labels:  uikit
Now Ui Kit
Now UI Kit Bootstrap 4 - Designed by Invision. Coded by Creative Tim
Stars: ✭ 1,705 (+1044.3%)
Mutual labels:  uikit
Calendarkit
📅 Calendar for Apple platforms in Swift
Stars: ✭ 2,049 (+1275.17%)
Mutual labels:  ios-ui
Ui7kit
Backport flat-style UIKit from iOS7 to iOS5+
Stars: ✭ 1,682 (+1028.86%)
Mutual labels:  uikit

Tangerine 🍊

Tangerine is a Swift µframework for fetching Images.

Installation

Swift Package Manager

Swift Package Manager is integrated within Xcode 11, so using Tangerine in your project is a piece of cake:

  1. File → Swift Packages → Add Package Dependency...
  2. Paste the repository URL (https://github.com/RuiAAPeres/Tangerine) and click Next.
  3. For Rules, either select version, branch or commit.
  4. Select the Target where you would like to add Tangerine. The correct one should be already selected for you.
  5. Click Finish.

Manual Installation

Drag the Tangerine.swift file into your project. 🍊

Usage

Typically a view should have a single ImageFetcher, and as such it’s not possible for one to fetch different images with only one instance of a ImageFetcher. From a code point of view:

let tangerines = URL(string: "https://www.strongertogether.coop/sites/default/files/Tangerines.jpg")!
let fetcher = ImageFetcher(urL: tangerines)
let example = ExampleView(fetcher: fetcher)
struct ExampleView: View {
  @ObservedObject var fetcher: ImageFetcher
  
  init(fetcher: ImageFetcher) {
    self.fetcher = fetcher
  }
  
  var body: some View {
    VStack {
      fetcher.image.map {
        Image(uiImage: $0)
          .resizable()
          .aspectRatio(contentMode: .fit)
      }
    }
    .onAppear(perform: fetcher.refresh)
  }
}

The actual HTTP request is done not when the ImageFetcher is created, but when the refresh method is called.

Tangerine also supports caching via NSCache. You can either supply yours, or use the default one.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].