Skip to content

Commit

Permalink
Updating Badges
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackjacx committed Jul 16, 2019
1 parent 44629b9 commit 18a889e
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 15 deletions.
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,26 @@
<img alt="Build Status" src="https://app.bitrise.io/app/f12f3f1a861800f0/status.svg?token=yxLmeCg3EaFOFnZKhbHGrQ&branch=develop"/>
</a>
<img alt="Github Current Release" src="https://img.shields.io/github/release/blackjacx/Columbus.svg" />
<img alt="Cocoapods Platforms" src="https://img.shields.io/cocoapods/p/Columbus.svg"/>
<img alt="Xcode 10.0+" src="https://img.shields.io/badge/Xcode-10.0%2B-blue.svg"/>
<img alt="iOS 11.0+" src="https://img.shields.io/badge/iOS-11.0%2B-blue.svg"/>
<img alt="Swift 5.0+" src="https://img.shields.io/badge/Swift-5.0%2B-orange.svg"/>
<img alt="Platforms" src="https://img.shields.io/cocoapods/p/Columbus.svg"/>
<img alt="Xcode 11.0+" src="https://img.shields.io/badge/Xcode-11.0%2B-blue.svg"/>
<img alt="iOS 13.0+" src="https://img.shields.io/badge/iOS-13.0%2B-blue.svg"/>
<img alt="Swift 5.1" src="https://img.shields.io/badge/swift-5.1-FFAC45.svg"/>
<a href="https://github.com/apple/swift-package-manager">
<img src="https://img.shields.io/badge/SwiftPM-compatible-brightgreen.svg" alt="SwiftPM: Compatible">
</a>
<img alt="Github Repo Size" src="https://img.shields.io/github/repo-size/blackjacx/Columbus.svg" />
<img alt="Github Code Size" src="https://img.shields.io/github/languages/code-size/blackjacx/Columbus.svg" />
<img alt="Github Closed PR's" src="https://img.shields.io/github/issues-pr-closed/blackjacx/Columbus.svg" />
<a href="https://github.com/Blackjacx/Columbus/pulls?q=is%3Apr+is%3Aclosed">
<img alt="Github Closed PR's" src="https://img.shields.io/github/issues-pr-closed/blackjacx/Columbus.svg" />
</a>
<a href="https://github.com/Carthage/Carthage">
<img alt="Carthage compatible" src="https://img.shields.io/badge/Carthage-Compatible-brightgreen.svg?style=flat"/>
<img alt="Carthage Compatible" src="https://img.shields.io/badge/Carthage-Compatible-brightgreen.svg?style=flat"/>
</a>
<a href="https://cocoapods.org/pods/Columbus">
<img src="https://img.shields.io/badge/CocoaPods-compatible-4BC51D.svg?style=flat" alt="CocoaPods Compatible">
</a>
<a href="https://github.com/Blackjacx/Columbus/blob/develop/LICENSE?raw=true">
<img alt="License" src="https://img.shields.io/cocoapods/l/Columbus.svg?style=flat"/>
<img src="https://img.shields.io/badge/license-MIT-lightgrey.svg" alt="License MIT">
</a>
<a href="https://codebeat.co/projects/github-com-blackjacx-columbus-develop">
<img alt="codebeat badge" src="https://codebeat.co/badges/7ad2da62-af22-4a76-a4da-2eb2002bde18" />
Expand All @@ -39,7 +47,9 @@ A country picker for iOS, tvOS ad watchOS with features you will only find distr

## Installation

Columbus is compatible with `iOS 11` and higher and builds with `Xcode 10` and `Swift 5.0`.
Columbus 2.x is implemented using SwiftUI and therefore only compatible with `iOS 13` and higher. It builds with `Xcode 11` and `Swift 5.1`.

If you need to support iOS 11/12 please use Columbus version 1.x.

### CocoaPods

Expand Down
2 changes: 1 addition & 1 deletion Source/Classes/Country.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ enum CountryDecodingError: Error {

public struct Country: Identifiable {

/// Confirmance to `Identifiable`
/// Conformance to `Identifiable`
public var id = UUID()
/// Name of the country
public let name: String
Expand Down
8 changes: 7 additions & 1 deletion Source/Classes/CountryListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@ public struct CountryListView: View {

#warning("Implement a search bar!")
#warning("Implement an index bar!")
#warning("Find out how to elegate country to the outside world")
#warning("Consider distributing the framework as Binary Package so it is not compiled all the time.")

#warning("Update README.md for SPM/Binary Package and usage instructions.")
public var body: some View {
NavigationView {
List(store.countries) { country in
CountryRow(country: country)
CountryRow(country: country).tapAction {
print(country)
}
}
.navigationBarTitle(Text("Countries"))
}
Expand Down
13 changes: 9 additions & 4 deletions Source/Classes/CountryRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,30 @@ import SwiftUI
struct CountryRow : View {
var country: Country

#warning("Apply attributes to both text labels: Columbus.config.textAttributes")
#warning("Find out how to prevent truncation for dialing code label")
#warning("Apply attributes to both text labels: Columbus.config.textAttributes. See [ViewModifiers](https://www.hackingwithswift.com/quick-start/swiftui/how-to-create-custom-modifiers)")
var body: some View {
return HStack(spacing: Columbus.config.rasterSize) {
let raster = Columbus.config.rasterSize

return HStack() {
country.flagIcon
.resizable()
.aspectRatio(contentMode: .fit)
.shadow(color: Color(.shadow), radius: Columbus.config.shadowRadius, x: 1, y: 1)
.frame(width: Columbus.config.flagWidth, alignment: .leading)
.padding([.trailing], raster)
.layoutPriority(1.0)

Text(country.name)
.color(Color(.text))
.frame(alignment: .leading)

Spacer()
Spacer(minLength: raster)

Text(country.dialingCodeWithPlusPrefix)
.color(Color(.text))
.frame(alignment: .trailing)
.background(Color.red)
.layoutPriority(0.5)
}
}
}
Expand Down
1 change: 0 additions & 1 deletion Source/Classes/CountryStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ private struct CountryList: Decodable {
}
}
self.countries = countries
// .filter { $0.flagIcon.size != .zero }
.sorted { $1.name > $0.name }
}
}
Expand Down

0 comments on commit 18a889e

Please sign in to comment.