As I’m setting up my new laptop, I will use few minutes to write down my list of apps, you will maybe find some useful stuff in it.
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
struct List : View { | |
var body: some View { | |
NavigationView { | |
List(viewModel.superHeroes.identified(by: \.name)) { value in | |
SwitchValue(value) { | |
CaseType(is: SuperHero.self) { superHero in | |
Text(superHero.name) | |
} | |
CaseType(is: Avenger.self) { avenger in |
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
// | |
// ViewController.swift | |
// LifeCycleDelegate | |
// | |
// Created by Davide Mendolia on 30/01/2018. | |
// Copyright © 2018 Karumi. All rights reserved. | |
// | |
import UIKit |
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
// | |
// ViewController.swift | |
// LifeCycleDelegate | |
// | |
// Created by Davide Mendolia on 30/01/2018. | |
// Copyright © 2018 Karumi. All rights reserved. | |
// | |
import UIKit |
I hereby claim:
- I am davideme on github.
- I am davideme (https://keybase.io/davideme) on keybase.
- I have a public key ASDnkkom9QjmbOGfsiIALJLSzQM14-f0uyExBvQmaCZa3wo
To claim this, I am signing this object:
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
class MealTableViewController: UITableViewController { | |
// MARK: Properties | |
var meals = [Meal]() | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Use the edit button item provided by the table view controller. |
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
extension AWSCognitoDataset { | |
subscript(index: String) -> String { | |
get { | |
return self.stringForKey(index) | |
} | |
set(newValue) { | |
self.setString(newValue, forKey: index) | |
} | |
} | |
} |
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
// This protocol cannot be implemented by a enum. | |
// Because enums may not contain stored properties | |
protocol SomeProtocol { | |
var mustBeSettable: Bool { get set } | |
} | |
struct SomeStruct: SomeProtocol { | |
var mustBeSettable:Bool | |
} |