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
import Foundation | |
class ProductCategoriesPresenter: ProductCategoriesPresentation { | |
// MARK: Properties | |
weak var view: ProductCategoriesView? | |
var router: ProductCategoriesWireframe? | |
var interactor: ProductCategoriesUseCase? | |
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
protocol ProductCategoriesCoreDelegate: class { | |
func setupSubmodules(with product: Product) | |
func setupView(for category: Category) | |
} | |
protocol ProductCategoriesPageDelegate: class { | |
func onPageChanged(_ newPageIndex: Int) | |
} |
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
import Foundation | |
import UIKit | |
class KeyboardController: NSObject { | |
var viewController: UIViewController | |
var constraint: NSLayoutConstraint | |
var isKeyboardHidden: Bool { | |
return constraint.constant == 0 | |
} |
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
import Foundation | |
import RealmSwift | |
import ObjectMapper | |
import ObjectMapper_Realm | |
class Event: Object, Mappable, Identifiable, RandomizePlaceholder, TrackableEntity { | |
dynamic var id: Int = 0 | |
fileprivate dynamic var stringType: String = "" | |
fileprivate dynamic var title = "" |
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
class SessionHelper private constructor() { | |
... | |
fun refreshCredentials(): String? { |
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
object RetrofitHelper { | |
(...) | |
private fun rebuildRetrofit(useAuth: Boolean) { | |
val client = buildOkHttpClient(useAuth) | |
retrofit = Retrofit.Builder() | |
.baseUrl(BuildConfig.API_BASE_URL) |
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
package ....models.entities.Converters | |
import android.os.Parcel | |
import org.parceler.Parcels | |
import org.parceler.converter.ArrayListParcelConverter | |
import ....models.entities.Event.EventImages | |
/** | |
* Created by gracietti on 11/08/17. |
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
// Nessa tarefa, nos queremos saber quantos likes cada post recebeu. | |
// Já temos alguns dados de exemplo criados, simulando que alguns usuários deram like em alguns posts. | |
// Agora queremos passar o ID de um post e saber o total de liks recebidos por ele. | |
// Com essa atividade, vocês já relembrarão alguns comandos de lógica de programaço em KOTLIN. | |
// Dica: para implementar o contador, vocês precisaro usat FOR e IF. | |
OlderNewer