import UIKit
// MARK: - Custom Delegate Protocol
protocol PostCellDelegate: AnyObject {
func postCell(_ cell: PostTableViewCell, didTapLike post: Post)
func postCell(_ cell: PostTableViewCell, didTapComment post: Post)
import SwiftUI
struct PostsView: View {
@StateObject private var viewModel = PostsViewModel()
var body: some View {
import UIKit
class ProfileViewController: UIViewController {
private let profileImageView: UIImageView = {
let imageView = UIImageView()
imageView.contentMode = .scaleAspectFill
import Foundation
// MARK: - Basic Codable
struct User: Codable {
let id: Int
let username: String
import SwiftUI
import MapKit
import CoreLocation
struct Location: Identifiable {
let id = UUID()
import SwiftUI
// MARK: - Size Preference
struct SizePreferenceKey: PreferenceKey {
static var defaultValue: CGSize = .zero
import SwiftUI
import AVFoundation
import AVKit
struct VideoPlayerView: View {
let videoURL: URL
import Foundation
enum UserDefaultsKey: String {
case username
case isFirstLaunch
case lastSyncDate
import Foundation
import UIKit
class ImageProcessor {
// Background processing with main thread updates
func processImage(_ image: UIImage, completion: @escaping (UIImage?) -> Void) {
import SwiftUI
struct Triangle: Shape {
func path(in rect: CGRect) -> Path {
var path = Path()
path.move(to: CGPoint(x: rect.midX, y: rect.minY))
import SwiftUI
// MARK: - State and Binding
struct CounterView: View {
@State private var count = 0
# Fastlane Fastfile for automated deployment
default_platform(:ios)
platform :ios do
desc "Push a new beta build to TestFlight"
lane :beta do