SwiftUI Responsive UI Design - Adaptive Layout - iOS 18

Поделиться
HTML-код
  • Опубликовано: 13 окт 2024

Комментарии • 7

  • @Kavsoft
    @Kavsoft  Месяц назад +7

    I found out that the UIGestureRepresentable doesn't update once the gesture has been created. Thus, isEnabled will have no effect. Instead, follow these steps 👇
    1. Create a new State Variable in the Home View,
    @State private var panGesture: UIPanGestureRecognizer?
    2. Add this line at the start of the CustomGesture closure,
    if panGesture == nil { panGesture = gesture }
    3. Lastly, add this onChange modifier inside the AdaptiveView closure,
    .onChange(of: isLandscape) { oldValue, newValue in
    panGesture?.isEnabled = !newValue
    }
    Have a great day, Folks!

    • @osman-cm9nc
      @osman-cm9nc Месяц назад

      hey nice can you help me with my app

  • @kwiky5643
    @kwiky5643 Месяц назад

    Hi, since this is a video about twitter, could you please one day make one about the tweets’ navigation links to see responses and how a similar database structure could be created ? Maybe with Firebase ?

  • @will.gallegos
    @will.gallegos Месяц назад +2

    Bro has a crush on iJustine 😭
    But anyway nice video, my only suggestion is if you can add macOS support for future videos too if possible, since my app is Multiplatform based on my iOS app.

  • @SwiftCoding55-x9f
    @SwiftCoding55-x9f Месяц назад

    Nice video thank you

  • @ThePhotodiver
    @ThePhotodiver Месяц назад

    If you add a NavigationTitle to the NavigationStack and ship to show the SideBar, the title shows on top of the SideBar. And if you scroll the SideBar the title becomes inline. Is there a way to not show this when swiping to the SideBar?

    • @Kavsoft
      @Kavsoft  Месяц назад

      Just use this line after the layout closure, i.e,
      layout {
      ….
      }
      .toolbarVisibility(.hidden, for: .navigationBar)