This repository has been archived by the owner on Sep 5, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP for #33
- Loading branch information
Showing
513 changed files
with
969 additions
and
85 deletions.
There are no files selected for viewing
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
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
OpenFoodFacts/Views/Products/Search/SearchTableViewController.storyboard
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
23 changes: 23 additions & 0 deletions
23
Sources/Assets.xcassets/navbar-button-history.imageset/Contents.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "navbar-button-history.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "navbar-button-history@2x.png", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "navbar-button-history@3x.png", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+631 Bytes
Sources/Assets.xcassets/navbar-button-history.imageset/navbar-button-history.png
Oops, something went wrong.
Binary file added
BIN
+1.36 KB
...ces/Assets.xcassets/navbar-button-history.imageset/navbar-button-history@2x.png
Oops, something went wrong.
Binary file added
BIN
+2.09 KB
...ces/Assets.xcassets/navbar-button-history.imageset/navbar-button-history@3x.png
Oops, something went wrong.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
// | ||
// UIColor.swift | ||
// OpenFoodFacts | ||
// | ||
// Created by Andrés Pizá Bückmann on 17/12/2017. | ||
// Copyright © 2017 Andrés Pizá Bückmann. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
// https://cocoacasts.com/from-hex-to-uicolor-and-back-in-swift/ | ||
extension UIColor { | ||
|
||
// MARK: - Initialization | ||
|
||
convenience init?(hex: String) { | ||
var hexSanitized = hex.trimmingCharacters(in: .whitespacesAndNewlines) | ||
hexSanitized = hexSanitized.replacingOccurrences(of: "#", with: "") | ||
|
||
var rgb: UInt32 = 0 | ||
|
||
var r: CGFloat = 0.0 | ||
var g: CGFloat = 0.0 | ||
var b: CGFloat = 0.0 | ||
var a: CGFloat = 1.0 | ||
|
||
let length = hexSanitized.count | ||
|
||
guard Scanner(string: hexSanitized).scanHexInt32(&rgb) else { return nil } | ||
|
||
if length == 6 { | ||
r = CGFloat((rgb & 0xFF0000) >> 16) / 255.0 | ||
g = CGFloat((rgb & 0x00FF00) >> 8) / 255.0 | ||
b = CGFloat(rgb & 0x0000FF) / 255.0 | ||
|
||
} else if length == 8 { | ||
r = CGFloat((rgb & 0xFF000000) >> 24) / 255.0 | ||
g = CGFloat((rgb & 0x00FF0000) >> 16) / 255.0 | ||
b = CGFloat((rgb & 0x0000FF00) >> 8) / 255.0 | ||
a = CGFloat(rgb & 0x000000FF) / 255.0 | ||
|
||
} else { | ||
return nil | ||
} | ||
|
||
self.init(red: r, green: g, blue: b, alpha: a) | ||
} | ||
|
||
// MARK: - Computed Properties | ||
|
||
var toHex: String? { | ||
return toHex() | ||
} | ||
|
||
// MARK: - From UIColor to String | ||
|
||
func toHex(alpha: Bool = false) -> String? { | ||
guard let components = cgColor.components, components.count >= 3 else { | ||
return nil | ||
} | ||
|
||
let r = Float(components[0]) | ||
let g = Float(components[1]) | ||
let b = Float(components[2]) | ||
var a = Float(1.0) | ||
|
||
if components.count >= 4 { | ||
a = Float(components[3]) | ||
} | ||
|
||
if alpha { | ||
return String(format: "%02lX%02lX%02lX%02lX", lroundf(r * 255), lroundf(g * 255), lroundf(b * 255), lroundf(a * 255)) | ||
} else { | ||
return String(format: "%02lX%02lX%02lX", lroundf(r * 255), lroundf(g * 255), lroundf(b * 255)) | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Binary file renamed
BIN
+12.4 MB
Crashlytics.framework/Crashlytics → ...meworks/Crashlytics.framework/Crashlytics
Binary file not shown.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
Binary file renamed
BIN
+922 Bytes
Crashlytics.framework/Info.plist → ...ameworks/Crashlytics.framework/Info.plist
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file renamed
BIN
+294 KB
Crashlytics.framework/submit → ...s/Frameworks/Crashlytics.framework/submit
Binary file not shown.
Binary file renamed
BIN
+704 KB
Crashlytics.framework/uploadDSYM → ...ameworks/Crashlytics.framework/uploadDSYM
Binary file not shown.
Binary file renamed
BIN
+5.7 MB
Fabric.framework/Fabric → Sources/Frameworks/Fabric.framework/Fabric
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file renamed
BIN
+873 Bytes
Fabric.framework/Info.plist → ...es/Frameworks/Fabric.framework/Info.plist
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.