Configured colours and added additional images to ready app for iOS 13 dark mode

This commit is contained in:
Deniz Duezgoeren
2019-10-08 21:37:42 +02:00
parent b7bc097664
commit 85efe3955d
310 changed files with 6512 additions and 4492 deletions
+17 -31
View File
@@ -214,14 +214,9 @@ open class Elements: NSCopying {
* @see #outerHtml()
*/
open func html()throws->String {
let sb: StringBuilder = StringBuilder()
for element: Element in this {
if (sb.length != 0) {
sb.append("\n")
}
sb.append(try element.html())
}
return sb.toString()
var text = try this.reduce("") {result, name in "\(result)\(try name.html())\n"}
text.removeLast()
return text
}
/**
@@ -584,33 +579,24 @@ extension Elements: Equatable {
}
/**
* Elements IteratorProtocol.
* Elements RandomAccessCollection
*/
public struct ElementsIterator: IteratorProtocol {
/// Elements reference
let elements: Elements
//current element index
var index = 0
/// Initializer
init(_ countdown: Elements) {
self.elements = countdown
extension Elements: RandomAccessCollection {
public subscript(position: Int) -> Element {
return this[position]
}
/// Advances to the next element and returns it, or `nil` if no next element
mutating public func next() -> Element? {
let result = index < elements.size() ? elements.get(index) : nil
index += 1
return result
public var startIndex: Int {
return this.startIndex
}
}
/**
* Elements Extension Sequence.
*/
extension Elements: Sequence {
/// Returns an iterator over the elements of this sequence.
public func makeIterator() -> ElementsIterator {
return ElementsIterator(self)
public var endIndex: Int {
return this.endIndex
}
/// The number of Element objects in the collection.
/// Equivalent to `size()`
public var count: Int {
return this.count
}
}