Can you use AutoLayout in SwiftUI? Programmatic AutoLayout?

Опубликовано: 13 Июль 2026
на канале: maxcodes
3,610
47

Join the community slack channel for free: https://join.slack.com/t/maxcodes/sha...

A quick overview of why you cant use AutoLayout in SwiftUI. HOWEVER, you can still use UIKit with SwiftUI!

The answer is: you can not use SwiftUI with AutoLayout or NSLayoutConstraint. You can not use SwiftUI with Storyboards. However, Canvas is different than Storyboards. Will SwiftUI replace UIKit? In my opinion, SwiftUI will replace UIKit eventually. Not for a good while though. You can combine SwiftUI with UIKit with UIViewRepresentable btw.

MacBook Coding Stickers (Swift stickers): https://www.maxcodes.io/stickers

MASTER SWIFTUI: https://www.udemy.com/swift-ui/?coupo... - section 2 is now available to enrolled students!

community slack channel: http://bit.ly/mcslack
pro courses: https://www.maxcodes.io/courses
Newsletter: https://www.maxcodes.io/

Twitter: http://bit.ly/maxcodestwitter
Instagram: http://bit.ly/maxcodesinstagram
medium:   / max.codes  

get my latest course: https://www.udemy.com/coreanimation/?...
Core Location MapKit Course: http://bit.ly/ytmapkit
CORE DATA Course: http://bit.ly/injectcoredata
Collection View (Pinterest) Course: http://bit.ly/cvlayouts
UITableView Animations: http://bit.ly/uitableviews
Sticker Pack Course: http://bit.ly/stickerpackcourse
Build a Beginner To Do List: http://bit.ly/todolistswift
Animations Course!: https://www.udemy.com/coreanimation/?...

#swiftui #autolayout #storyboards

Intro music by Nato Beats
Intro music original video location:    • Video