Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am bigMOTOR on github.
  • I am bigmotor (https://keybase.io/bigmotor) on keybase.
  • I have a public key whose fingerprint is D275 173A D711 5FFB 2794 6CDE D444 AA5C 0823 E747

To claim this, I am signing this object:

//
// Parallax.swift
//
// Created by Nikolay Fiantsev on 21/02/2018.
// Copyright © 2018 Nikolay Fiantsev. All rights reserved.
//
import UIKit
enum ParallaxMagnitude: Float {

Privacy Policy PhotoMapper App (http://itunes.apple.com/app/id1347742014)

Nikolay Fiantsev built the PhotoMapper app as a Commercial app. This app is provided by Nikolay Fiantsev and is intended for use as is. This page is used to inform app users regarding our policies with the collection, use, and disclosure of Personal Information if anyone decided to use my app. My app doesn't collect any kind your Personal Information or any other information, which can identify you. My app can collect only anonymous information (such as error), which can be used for providing and improving the app. If you choose to use our app, then you agree to the collection and use of information in relation with this policy. We will not use or share your information with anyone except as described in this Privacy Policy.

Log Data

We want to inform you that whenever you use my app, we collect information that your iOS device sends to us that is called Log Data. This Log Data may include information such as your device’s Inte

@bigMOTOR
bigMOTOR / my_lldbinit
Created November 15, 2020 10:47
My LLDB Hacks
# add to ~/.lldbinit
#
# print JSON https://soffes.blog/debugging-json-data-in-lldb?utm_campaign=iOS%2BDev%2BWeekly&utm_medium=email&utm_source=iOS%2BDev%2BWeekly%2BIssue%2B482
command regex json 's/(.+)/expr let input = %1; print(String(data: try! JSONSerialization.data(withJSONObject: (input is Data ? (try! JSONSerialization.jsonObject(with: input as! Data, options: [])) : input as! Any), options: [.prettyPrinted]), encoding: .utf8)!)/'
@bigMOTOR
bigMOTOR / 2020-12-20_Article_SwiftUInCleanArchitecture_1.swift
Created December 20, 2020 09:46
2020-12-20_Article_SwiftUInCleanArchitecture_1
protocol ObserveTimerUseCase {
func startTimer() -> AnyPublisher<TimeInterval, Never>
}
extension ObserveTimerUseCase where Self: TimerRepositoryHolderType {
func startTimer() -> AnyPublisher<TimeInterval, Never> {
return self.timerRepository.startTimer()
}
}
@bigMOTOR
bigMOTOR / 2020-12-20_Article_SwiftUInCleanArchitecture_2.swift
Created December 20, 2020 15:58
2020-12-20_Article_SwiftUInCleanArchitecture_2
struct AppEnvironment {
let container: DIContainer
}
struct DIContainer: EnvironmentKey {
let repositories: Repositories
static var defaultValue: Self { DIContainer(repositories: Repositories()) }
}
extension EnvironmentValues {
@bigMOTOR
bigMOTOR / 2020-12-20_Article_SwiftUInCleanArchitecture_3.swift
Created December 20, 2020 16:04
2020-12-20_Article_SwiftUInCleanArchitecture_3
protocol ModelledView: View {
associatedtype ViewModel: ObservableObject
var viewModel: ViewModel { get }
init(model: ViewModel)
}
struct ModelledViewFactory<T: ModelledView> {
@Environment(\.diContainer) private var diContainer: DIContainer
func build(_ builder: (DIContainer)->T.ViewModel) -> T {
@bigMOTOR
bigMOTOR / 2020-12-20_Article_SwiftUInCleanArchitecture_4.swift
Created December 20, 2020 16:06
2020-12-20_Article_SwiftUInCleanArchitecture_4
struct ContentView: View {
var body: some View {
return ModelledViewFactory<RootView>()
.build(RootView.ViewModel.init)
}
}
@bigMOTOR
bigMOTOR / 2021-01-30_Article_DataDrivenRxDatasources_1.swift
Last active January 30, 2021 10:24
2021-01-30_Article_DataDrivenRxDatasources_1.swift
tableView.rx
.bind(sections: sections)
.disposed(by: bag)
@bigMOTOR
bigMOTOR / 2021-01-30_Article_DataDrivenRxDatasources_2.swift
Created January 30, 2021 10:25
2021-01-30_Article_DataDrivenRxDatasources_2.swift
let dataSource = RxTableViewSectionedReloadDataSource<SectionOfCustomData>(
configureCell: { dataSource, tableView, indexPath, item in
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)
cell.textLabel?.text = "Item \(item.anInt): \(item.aString) - \(item.aCGPoint.x):\(item.aCGPoint.y)"
return cell
})