Skip to content

Instantly share code, notes, and snippets.

View GabrielSilveiraa's full-sized avatar

Gabriel Silveira GabrielSilveiraa

  • Wallapop
  • Barcelona, Spain
View GitHub Profile
@GabrielSilveiraa
GabrielSilveiraa / gist:0af99afffc68e4645b7b506ab33886bb
Created August 23, 2023 12:31
Script to find all Swift files present in your project folder but not referenced in your xcode project
find /path/to/excode/project -type f -name "*.swift" -print0 | while IFS= read -r -d '' file; do
filename=$(basename "$file")
if ! grep -qF "$filename" /path/to/excode/project/project.pbxproj; then
echo "Swift file '$file' exists but is not in the Xcode project."
fi
done
//https://medium.com/blablacar-tech/rxswift-mvvm-66827b8b3f10
protocol ViewModel {
associatedtype Input
associatedtype Output
func transform(input: Input) -> Output
}
class ViewModelExample: ViewModel {
@GabrielSilveiraa
GabrielSilveiraa / BaseView
Created February 4, 2020 20:55
A custom UIView class designed to use with view coded layout
import UIKit
/**
**A Custom UIView class designed to use with view coded layout**
**Lifecycle:**
1. `init()`
2. `initialize()` *Add subviews*
3. `installConstraints()` *Setup constraints*
*/
typealias BaseView = BaseViewClass & BaseViewProtocol