This file contains hidden or 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 UIKit | |
class ImageDownloader { | |
// DOWNLOAD IMAGE METHOD | |
func loadImage(of from: URL, completion: @escaping () -> Void ) -> UIImage { | |
let size = CGSize(width: 100, height: 140) | |
// Download and Compress image to fit container size | |
DispatchQueue.global(qos: .background).async { | |
guard let newimage = self.downloadAndCompress(url: url, newSize: size) else { return } |
This file contains hidden or 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
#!/bin/bash | |
# cd /usr/local/bin | |
echo "Clearing Derived Data" | |
rm -rf /Users/<MyUserName>/Library/Developer/Xcode/DerivedData | |
echo "Done" |
This file contains hidden or 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
{ | |
"data" : "some data" | |
} |
This file contains hidden or 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
{ | |
"firstName": "Name", | |
"lastName": "LastName", | |
"age": 10, | |
"address": | |
{ | |
"streetAddress": "Reforma", | |
"city": "Mexico", | |
"state": "CDMX", | |
"postalCode": "00600" |
This file contains hidden or 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
[ | |
{ | |
"album": "Dark side of the moon", | |
"year": "1927", | |
"cover": "https://upload.wikimedia.org/wikipedia/en/3/3b/Dark_Side_of_the_Moon.png", | |
"genre": "Pop" | |
}, | |
{ | |
"album": "Love letters", | |
"year": "2014", |
This file contains hidden or 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
{ | |
"animals": [ | |
{ | |
"id": 1, | |
"name": "Cat", | |
"type": "cat", | |
"weight": 23, | |
"area": ["home", "street"], | |
"can_climb_trees": true, | |
"competence": [ |
This file contains hidden or 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
// | |
//let episodeV = "episodeV" | |
// | |
//example(of: "Creating observables") { | |
// let mostPopular: Observable<String> = Observable<String>.just(episodeV) | |
//} | |
import RxSwift | |
// MARK: OBSERVABLES | |
/** |
This file contains hidden or 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
pod 'Auth0', :git => 'https://github.com/auth0/Auth0.swift.git', :commit => 'e399d67a57b80879947682807c20419bc8af9dad' |
This file contains hidden or 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 UIKit | |
enum CollectionDisplay { | |
case list | |
case twoColumns | |
} | |
class HomeCustomLayout: c { | |
This file contains hidden or 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 UIKit | |
class CustomView: UIView { | |
//Override the init() constructor so that you can call the function loadView() | |
override init(frame: CGRect) { | |
super.init(frame: frame) | |
loadView() | |
} | |