swift

swift
import SwiftUI

// MARK: - State and Binding
struct CounterView: View {
    @State private var count = 0

Property wrappers for SwiftUI state

swift swiftui property-wrappers
by Sofia Martinez 1 tab
swift
import UIKit
import Combine

class PostsTableViewController: UITableViewController {
    enum Section {
        case main

UIKit UITableView with diffable data source

swift uikit uitableview
by Sofia Martinez 2 tabs
swift
import UIKit

class SceneDelegate: UIResponder, UIWindowSceneDelegate {
    var window: UIWindow?
    var appCoordinator: AppCoordinator?

App lifecycle and scene management

swift ios lifecycle
by Sofia Martinez 2 tabs
swift
import StoreKit

class StoreKitManager: NSObject, ObservableObject {
    static let shared = StoreKitManager()

    @Published var products: [SKProduct] = []

StoreKit for in-app purchases

swift storekit iap
by Sofia Martinez 1 tab
swift
import SwiftUI

struct AnimationExamplesView: View {
    @State private var isExpanded = false
    @State private var rotation: Double = 0
    @State private var scale: CGFloat = 1.0

SwiftUI animations and transitions

swift swiftui animations
by Sofia Martinez 2 tabs
swift
import UIKit

// MARK: - Custom Delegate Protocol
protocol PostCellDelegate: AnyObject {
    func postCell(_ cell: PostTableViewCell, didTapLike post: Post)
    func postCell(_ cell: PostTableViewCell, didTapComment post: Post)

UIKit delegates and protocols

swift uikit delegates
by Sofia Martinez 1 tab
swift
import AuthenticationServices
import CryptoKit

class SignInWithAppleManager: NSObject, ObservableObject {
    @Published var isSignedIn = false
    @Published var userID: String?

Sign in with Apple authentication

swift sign-in-apple authentication
by Sofia Martinez 1 tab
swift
import SwiftUI
import AVFoundation
import AVKit

struct VideoPlayerView: View {
    let videoURL: URL

AVFoundation for media playback

swift avfoundation media
by Sofia Martinez 1 tab
swift
import UIKit

class HapticFeedbackManager {
    static let shared = HapticFeedbackManager()

    private let impactLight = UIImpactFeedbackGenerator(style: .light)

Haptic feedback with UIFeedbackGenerator

swift haptics feedback
by Sofia Martinez 1 tab
swift
import SwiftUI

struct Triangle: Shape {
    func path(in rect: CGRect) -> Path {
        var path = Path()
        path.move(to: CGPoint(x: rect.midX, y: rect.minY))

SwiftUI custom shapes and paths

swift swiftui shapes
by Sofia Martinez 1 tab
swift
import SwiftUI

struct ResponsiveGridView: View {
    let items: [GridItem]

    var body: some View {

SwiftUI GeometryReader for dynamic layouts

swift swiftui layout
by Sofia Martinez 1 tab
swift
import SwiftUI

struct AccessiblePostCard: View {
    let post: Post
    @State private var isLiked = false

Accessibility with VoiceOver support

swift swiftui accessibility
by Sofia Martinez 1 tab