ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

SwiftUI Vs. UIKit Pt. 1 - Hello, World!

Автор: Julian Michael Technologies

Загружено: 2023-05-31

Просмотров: 7839

Описание: In the world of iOS development, it's very common to hear developers talk about how much they love SwiftUI because it's a lot easier than UIKit, but what does that really mean in practice? Let's check out an example! 😍

I've created two identical apps in SwiftUI and UIKit, each one just shows "Hello, World!" on screen.

Here are all the steps I needed to take to programmatically create this view in UIKit:

1️⃣ Create the property that will hold the UILabel
2️⃣ Change the background color of the view so the text is visible
3️⃣ Assign the UILabel a value and set its text property equal to "Hello, World!"
4️⃣ Add the label as a subview to the view
5️⃣ Set translatesAutoResizingMaskIntoConstraints on the label to false
6️⃣ Set constraints on the label to keep it centered regardless of screen size and device orientation

Here are all the steps I needed to take to create this view in SwiftUI:

1️⃣ Write "Hello, World" in a Text view like this: Text("Hello, World!")

Not only does this show the text on the screen, but the text will automatically stay centered regardless of screen size and device orientation AND we get dark mode support out of the box. Turning dark mode on in the SwiftUI app makes the text white and turns the background black, but turning on dark mode in the UIKit app only makes the text white and does not change the background color to black. While this functionality is possible in UIKit, it just takes more code.

To summarize: Both frameworks are awesome for different reasons, but UIKit definitely requires more code to perform the same tasks most of the time 🤕

🙋‍♂️ Have you tried both frameworks? If so, which do you prefer? Let me know down in the comments!

Check out my website here: https://www.julianmichaeltechnologies...

Follow my other socials here:
Instagram:   / jmichaeltech  
TikTok:   / jmichaeltechnologies  
Facebook: https://www.facebook.com/jmichaeltech...
Twitter:   / jmichaeltech  

#shorts #iosdevelopment #swift #swiftui #appdevelopment #mobileappdevelopement #coding #programming #iPhone #iOS

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
SwiftUI Vs. UIKit Pt. 1 - Hello, World!

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

Стоит ли изучать SwiftUI или UIKit? (2024)

Стоит ли изучать SwiftUI или UIKit? (2024)

#UIKit или #SwiftUI? Что выбрать новичку? Мобильный разработчик

#UIKit или #SwiftUI? Что выбрать новичку? Мобильный разработчик

Remember UIKit?, Coding Agent Addiction, Server Side Swift, Menu & More

Remember UIKit?, Coding Agent Addiction, Server Side Swift, Menu & More

Swift in 100 Seconds

Swift in 100 Seconds

3 бесплатных ИИ-инструмента, которые актуальны для всех и экономят часы работы

3 бесплатных ИИ-инструмента, которые актуальны для всех и экономят часы работы

Чем ОПАСЕН МАХ? Разбор приложения специалистом по кибер безопасности

Чем ОПАСЕН МАХ? Разбор приложения специалистом по кибер безопасности

SwiftUI vs UIKit – Comparison of building the same app in each framework

SwiftUI vs UIKit – Comparison of building the same app in each framework

Моё честное мнение о SwiftUI, Flutter и React Native для создания приложений iOS

Моё честное мнение о SwiftUI, Flutter и React Native для создания приложений iOS

Вы просыпаетесь в 3 часа ночи? Вашему телу нужна помощь! Почему об этом не говорят?

Вы просыпаетесь в 3 часа ночи? Вашему телу нужна помощь! Почему об этом не говорят?

Liquid Glass - 5 Things You MUST Know Before Implementing

Liquid Glass - 5 Things You MUST Know Before Implementing

Wenn du neu bist, schau dir diese Videos an!

Wenn du neu bist, schau dir diese Videos an!

SwiftUI vs UIKit. Что выбрать новичку? / Мобильный разработчик

SwiftUI vs UIKit. Что выбрать новичку? / Мобильный разработчик

Can a tiny M5 Macbook Pro replace my 16 inch M1 Max?

Can a tiny M5 Macbook Pro replace my 16 inch M1 Max?

Введение в программный пользовательский интерфейс — UIKit | Xcode 14

Введение в программный пользовательский интерфейс — UIKit | Xcode 14

The AI Bubble Explained Like You're 5

The AI Bubble Explained Like You're 5

UIKit for SwiftUI Developers Lesson 1: Hello World

UIKit for SwiftUI Developers Lesson 1: Hello World

Я перестал пользоваться Google Поиском! Почему вам тоже стоит это сделать.

Я перестал пользоваться Google Поиском! Почему вам тоже стоит это сделать.

I Built an iPhone App Entirely with GPT-5

I Built an iPhone App Entirely with GPT-5

Advanced Navigation for SwiftUI apps

Advanced Navigation for SwiftUI apps

2026 iPhone is in Serious Trouble

2026 iPhone is in Serious Trouble

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]