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
| // MARK: - Route | |
| // Defines all possible navigation destinations in the app as a type-safe enum. | |
| // Associated values allow passing parameters directly through the route (e.g. OTP code), | |
| // eliminating the need to pass data separately after navigation. | |
| enum Route { | |
| case login | |
| case otp(code: String) | |
| case home | |
| } |
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
| // MARK: - AppCoordinator | |
| // Root coordinator that owns and manages all child coordinator flows. | |
| // Acts as the single entry point for navigation in the app. | |
| // Implements AuthCoordinatorDelegate to receive cross-flow navigation requests | |
| // without tight coupling between child coordinators. | |
| class AppCoordinator: AuthCoordinatorDelegate { | |
| var navigationController: UINavigationController | |
| // Dictionary-based storage allows O(1) lookup and safe cleanup by tag (UUID) | |
| var childCoordinators: [String: any Coordinable] = [:] |
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
| // | |
| // VideoProcessor.swift | |
| // VImage Editor | |
| // | |
| // Created by Onur Işık on 25.02.2022. | |
| // Copyright © 2022 Coder ACJHP. All rights reserved. | |
| // | |
| import UIKit | |
| import AVKit |
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 ImageRippleTransitionViewController: UIViewController, UIViewControllerTransitioningDelegate { | |
| public let backgroundImageView: UIImageView = { | |
| let imageView = UIImageView() | |
| imageView.contentMode = .scaleAspectFill | |
| imageView.isUserInteractionEnabled = true | |
| imageView.clipsToBounds = true | |
| imageView.translatesAutoresizingMaskIntoConstraints = false | |
| return imageView | |
| }() |
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 CarouselFlowLayout: UICollectionViewFlowLayout { | |
| let scaleFactor: CGFloat = 0.7 // Minimum scale for side cells | |
| override func prepare() { | |
| super.prepare() | |
| guard let collectionView else { return } | |
| scrollDirection = .horizontal | |
| // Define cell size | |
| itemSize = collectionView.bounds.inset(by: UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)).size |
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 StackedItemsViewController: UIViewController { | |
| private let backgroundImageView: UIImageView = { | |
| let image = UIImage(resource: .background) | |
| let imageView = UIImageView(image: image) | |
| imageView.contentMode = .scaleAspectFill | |
| imageView.isUserInteractionEnabled = true | |
| imageView.clipsToBounds = true | |
| imageView.translatesAutoresizingMaskIntoConstraints = false | |
| return imageView |
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 AnimationsTestViewController: UIViewController { | |
| enum AnimationPosiXDirection { | |
| case left, center, right | |
| } | |
| enum AnimationFlipDirection { | |
| case yAxis, center, xAxis | |
| } | |
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
| // | |
| // PhotoCell.swift | |
| // TestApp | |
| // | |
| // Created by Coder ACJHP on 20.10.2023. | |
| // | |
| import UIKit | |
| class PhotoCell: UICollectionViewCell { |
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
| fileprivate var circleIcon: UIImageView! | |
| fileprivate var circlePathaAnimation: CAKeyframeAnimation! | |
| // Drawing func that takes x position as an argument | |
| // Call this funtion inside 'drawRect' or 'onTouchMoves' | |
| fileprivate func drawHighlightCircleFromLeftPosition(_ posiX: CGFloat) { | |
| // If imageView and animation already created and existing change percentage | |
| if let circleIcon = self.circleIcon, | |
| let animation = circlePathaAnimation { |
NewerOlder