Skip to content

Instantly share code, notes, and snippets.

Thiago Lioy thiagolioy

Block or report user

Report or block thiagolioy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View MajorDiatonicHarmonySpec.swift
import Foundation
import Quick
import Nimble
@testable import Notes
class MajorDiatonicHarmonySpec: QuickSpec {
override func spec() {
View IonianModeSpec.swift
//
// IonianModeSpec.swift
// Notes
//
// Created by Thiago Lioy on 26/08/17.
// Copyright © 2017 com.tplioy. All rights reserved.
//
import Quick
import Nimble
View RxSwiftViewController.swift
import UIKit
import RxSwift
import RxCocoa
class RxSwiftViewController: UIViewController {
@IBOutlet var priceLabel: UILabel!
@IBOutlet var priceSlider: UISlider!
@IBOutlet var unitLabel: UILabel!
@IBOutlet var unitSlider: UISlider!
View RegularViewController.swift
import UIKit
class RegularViewController: UIViewController {
@IBOutlet var priceLabel: UILabel!
@IBOutlet var priceSlider: UISlider!
@IBOutlet var unitLabel: UILabel!
@IBOutlet var unitSlider: UISlider!
View file.rb
desc "Bootstrap"
lane :bootstrap do
xcake
sh "cp -r ../schemes/Marvel.xcscheme ../Marvel.xcodeproj/xcshareddata/xcschemes/"
cocoapods
end
View Cakefile.rb
# just helper variables to use these values in a consistent way across whole file
currentSwiftVersion = "3.1.0"
# Change this to set a different Project file name
project.name = "Marvel"
@thiagolioy
thiagolioy / notTodo.m
Created Apr 18, 2017
Code for presentation, what not to do inside a cell for row
View notTodo.m
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
switch (indexPath.section) {
case 1:
//
break;
case 2:
//
break;
View code.swift
func setupNavigationBackAction() {
self.navigationItem.hidesBackButton = true
var customBackButton = UIBarButtonItem(title: "Back", style: .done,
target: nil, action: nil)
customBackButton.rx.action = viewModel.backAction()
self.navigationItem.leftBarButtonItem = customBackButton
}
View CharacterFavoriteView.swift
import UIKit
import RxSwift
import ReSwift
class CharacterFavoriteView: FavoriteView, StoreSubscriber {
var character: Character?
override init(frame: CGRect) {
super.init(frame: frame)
View FetchedCharactersReducer.swift
import ReSwift
struct FetchedCharactersReducer: Reducer {
let apiManager: MarvelAPICalls
func handleAction(action: Action, state: FetchedCharactersState?) -> FetchedCharactersState {
switch action {
case let action as FetchCharactersAction:
fetchCharacters(query: action.query)
You can’t perform that action at this time.