Adapt SwiftUI app for iPad, Landscape, and Dark Mode | Todo List #6

Swiftful Thinking
19 Mar 202113:35

Summary

TLDR在这个视频中,Nick 通过 Swiffle Thinking 引导观众如何使他们的应用程序适应不同的运行环境。他们首先在 iPhone 上运行应用,确保它在竖屏和横屏模式下,以及在浅色和深色模式中都能良好运行。Nick 展示了如何通过调整 Swift UI 中的颜色和样式,使应用在不同模式下都能保持美观。他们还讨论了如何在 iPad 上测试应用,并解决了导航视图在 iPad 上的显示问题,以确保应用在不同设备上都能提供一致的用户体验。最后,Nick 强调了对应用进行彻底测试的重要性,并鼓励开发者关注细节,以确保他们的应用在各种条件下都能表现出色。

Takeaways

  • 📱 在视频中,Nick讨论了如何使应用程序适应不同的部署方式,包括横竖屏、iPhone和iPad以及明暗模式。
  • 🖥️ 首先,他们检查了应用在iPhone上的显示效果,确保在明暗模式下颜色和布局都看起来良好。
  • 🔄 Nick展示了如何通过改变颜色的appearance属性来适配暗模式,使得颜色在不同模式下都能保持易读性。
  • 🎨 他们对应用的辅助颜色进行了调整,以确保在暗模式下更加醒目和易读。
  • 📊 为了改善用户体验,Nick还调整了添加视图中占位符文本的背景颜色,使用了动态颜色来自动适应明暗模式。
  • 📲 在模拟器上测试了应用在不同设备方向(横屏和竖屏)下的表现,并进行了必要的调整。
  • 📐 通过设置最大宽度,Nick限制了“无项目”区域在横屏或大设备上的宽度,以保持布局的整洁。
  • 🔧 在iPad上测试应用时,发现并修复了由于导航视图在iPad上的默认样式导致的问题,改为了堆叠导航视图样式。
  • 📱 确认了应用在iPad上的表现,包括在横竖屏模式下的外观和功能。
  • 🔄 强调了应用的动态颜色功能,确保了在不同模式下都能提供良好的用户体验。
  • 🛠️ 通过SwiftUI的动态颜色和布局工具,简化了适配不同设备和模式的过程。
  • 📹 整个视频是一个实操教程,向观众展示了如何对一个简单的应用程序进行多设备和多模式的适配。

Q & A

  • 在视频中,Nick提到了哪些设备和模式,以确保应用程序的适配性?

    -Nick提到了iPhone和iPad设备,以及横屏和竖屏模式。此外,还提到了亮模式(light mode)和暗模式(dark mode)以确保应用程序在不同环境下的外观和性能。

  • 在视频中,应用程序最初在哪种模式下运行,后来又切换到了哪种模式?

    -最初,应用程序在亮模式(light mode)下运行,后来Nick切换到了暗模式(dark mode)以测试应用程序在暗背景下的表现。

  • 为了改善暗模式下的可读性,Nick对应用程序的哪些颜色进行了调整?

    -为了改善暗模式下的可读性,Nick调整了紫色和栗色(maroon)的强调色,将它们改为了更亮的紫色和草莓色(strawberry),以确保在黑色背景上更容易阅读。

  • 在iPad上运行应用程序时,遇到了什么问题,又是如何解决的?

    -在iPad上运行应用程序时,遇到了导航视图(navigation view)样式问题,iPad默认使用了带有侧边栏的样式,这并不适合他们的应用程序。通过在ToDo List App.swift文件中的导航视图上设置`.stackNavigationViewStyle()`,解决了这个问题。

  • 在视频中,Nick提到了哪些Swift UI的颜色特性?

    -Nick提到了Swift UI中的动态颜色(dynamic colors),这些颜色会根据亮模式和暗模式自动改变,如主色(primary color)和次色(secondary color)。此外,还提到了系统颜色(system colors),如`secondarySystemBackground`,它们也是自动适应不同模式的。

  • 为了测试应用程序在不同设备和模式下的表现,Nick使用了哪些工具?

    -Nick使用了模拟器(simulator)来测试应用程序在不同设备和模式下的表现。他还提到了使用Xcode的画布(canvas)功能,可以在不运行模拟器的情况下预览应用程序在亮模式和暗模式下的效果。

  • 在调整应用程序以适应iPad时,Nick对导航视图做了哪些改变?

    -为了使导航视图在iPad上正确显示,Nick在ToDo List App.swift文件中的导航视图上添加了`.stackNavigationViewStyle()`,以确保导航视图使用标准的堆叠样式,而不是iPad默认的侧边栏样式。

  • 在视频中,Nick提到了如何调整应用程序以适应横屏模式?

    -Nick提到,由于在设计屏幕布局时使用了如`maxWidth`这样的Swift UI布局特性,应用程序能够自动适应横屏模式。他还特别调整了“无项目”视图的宽度,设置了最大宽度为400,以确保在横屏或大设备上显示效果更佳。

  • 在视频中,Nick是如何处理应用程序在暗模式下的文本字段和占位符文本的可读性问题的?

    -Nick发现在暗模式下,文本字段的占位符文本颜色变得不明显,因此他决定使用动态颜色来自定义文本字段的背景颜色,以提高占位符文本的可读性。

  • 在视频中,Nick是否提到了对应用程序进行测试的重要性?

    -是的,Nick提到了对应用程序进行测试的重要性,他强调了确保应用程序在不同设备、模式和方向下都能良好运行和显示是至关重要的。

  • 在视频中,Nick是否提到了如何为应用程序添加对不同语言的支持?

    -不,Nick在视频中没有提到为应用程序添加对不同语言的支持。他主要关注的是应用程序在不同设备、模式和方向下的适配性。

  • 在视频中,Nick是否提到了如何处理应用程序在不同屏幕尺寸下的布局问题?

    -是的,Nick提到了在不同屏幕尺寸下,如iPad的12.9英寸屏幕上,应用程序的布局问题。他通过设置最大宽度来限制某些视图的宽度,以确保布局在不同屏幕尺寸下都能保持合理。

Outlines

00:00

📱 适配不同模式和设备

Nick介绍了如何使应用程序在不同的模式和设备上运行良好。他提到,到目前为止,他们只在iPhone上以竖屏、浅色模式测试了应用。本视频的目标是让应用在各种部署方式下都能适应,包括横屏和竖屏模式,以及在iPhone和iPad上的表现,还有在浅色和深色模式下的外观。他首先在iPhone 12的模拟器上运行应用,并检查了浅色模式下的颜色方案,然后切换到深色模式,并调整了颜色以适应深色背景。

05:00

🖌️ 调整颜色和动态背景

Nick展示了如何在深色模式下调整应用的颜色,以提高可读性。他通过在Assets.xcassets文件夹中修改强调色和次要强调色,使它们在深色模式下更亮。接着,他解决了深色模式下占位符文本不可见的问题,通过使用动态颜色来更改背景色,确保文本在任何模式下都清晰可见。他还提到了在模拟器上测试应用,并在Canvas上快速预览不同模式的方法。

10:01

📱 适配横屏和iPad设备

为了确保应用在横屏和iPad上也能良好运行,Nick对应用进行了测试和调整。他首先限制了'no items'区域的宽度,以避免在横屏或大设备上显得过宽。然后,他在iPad Pro 12.9英寸模拟器上运行了应用,并解决了由于iPad上导航视图默认样式不同导致的问题,通过设置导航视图样式为'stack'来恢复期望的界面布局。最后,他确认了应用在横屏模式下的表现,并强调了应用现在已准备好发布。

Mindmap

Keywords

💡适配性

适配性指的是应用程序能够适应不同的设备、方向和显示模式。在视频中,Nick提到他们将使应用程序不仅在iPhone上运行良好,还要适配iPad,同时在横屏和竖屏模式下都能提供良好的用户体验。适配性是确保应用广泛可用性和用户满意度的关键因素。

💡Swift UI

Swift UI是一个用于构建用户界面的Apple框架,它允许开发者以声明式的方式创建应用程序界面。在视频中,Nick使用了Swift UI来调整应用程序的界面,以适应不同的显示模式和设备。Swift UI的动态颜色功能使得在不同的光照条件下(如亮模式和暗模式)界面颜色能够自动调整。

💡暗模式

暗模式是一种界面显示模式,它使用深色背景来减少屏幕亮度,从而在低光环境下减少眼睛疲劳。在视频中,Nick展示了如何将应用程序切换到暗模式,并调整了颜色以确保在暗模式下文本和界面元素的可读性。

💡动态颜色

动态颜色是Swift UI中的一个特性,允许颜色根据当前的系统主题(如亮模式或暗模式)自动变化。视频中提到,通过使用动态颜色,开发者可以确保应用在不同的光照环境下都能保持良好的视觉效果。

💡模拟器

模拟器是一种软件,它可以模拟真实设备的硬件和操作系统环境,让开发者能够在没有物理设备的情况下测试应用程序。在视频中,Nick使用iPhone模拟器来测试应用程序在不同模式和设备上的表现。

💡导航视图

导航视图是Swift UI中的一个组件,用于在应用程序中实现页面间的导航。在视频中,Nick调整了导航视图的样式,以确保在iPad上显示时,导航栏不会以侧边栏的形式出现,而是保持传统的堆叠式导航,这更适合他们的应用程序设计。

💡iPad Pro

iPad Pro是Apple公司生产的iPad系列中的高端产品,以其较大的显示屏和强大的处理能力而闻名。在视频中,Nick选择了12.9英寸的iPad Pro模拟器来测试应用程序,因为更大的屏幕可以更好地展示应用程序在大屏幕上的布局和适配性。

💡横屏模式

横屏模式是指设备在水平方向上使用时的显示模式。与竖屏模式相比,横屏模式通常提供更宽的视图,适合观看视频或进行多任务操作。视频中,Nick测试了应用程序在横屏模式下的表现,并调整了界面元素以确保在横屏模式下也能提供良好的用户体验。

💡资产目录

资产目录(Assets.xcassets)是Xcode项目中的一个资源管理器,用于存储和管理应用程序中的图像、颜色和其他资源。在视频中,Nick通过资产目录来调整应用程序的颜色,以适应不同的显示模式。

💡系统颜色

系统颜色是Swift UI提供的一组预定义颜色,它们可以根据用户的系统设置自动调整。这些颜色包括文本、背景和其他界面元素的颜色。在视频中,Nick使用了系统颜色来确保应用程序的文本和背景在不同模式下都能保持适当的对比度和可读性。

💡最大宽度

最大宽度是一个布局参数,用于限制视图或布局容器在水平方向上的最大尺寸。在视频中,Nick为“无项目”视图设置了最大宽度,以避免在横屏或大屏幕上显示时内容过于分散,从而保持界面的整洁和易读性。

Highlights

在本课程中,我们之前只在iPhone上以竖屏模式和浅色模式运行了我们的应用程序。

本视频我们将使应用程序适应不同的部署方式,包括横竖屏和明暗模式。

首先在iPhone 12模拟器上以浅色模式运行应用程序,检查颜色和布局。

在深色模式下,文本使用的主要颜色会自动调整,但紫色在黑色背景上阅读困难。

为了改善深色模式下的可读性,调整了紫色和褐红色为更浅的色调。

使用Swift UI的动态颜色,如系统背景色,以在明暗模式间自动切换。

在iPad上测试应用程序,发现导航视图默认样式在iPad上显示为侧边栏。

通过设置导航视图样式为stack,解决了iPad上的导航问题。

限制了“无项目”视图的最大宽度,以适应不同屏幕尺寸和方向。

在横屏模式下测试应用程序,确保布局和功能正常。

在iPad上运行应用程序,确认在大屏幕上的显示效果良好。

调整了应用程序的颜色方案,以确保在浅色和深色模式下都具有良好的可读性和美观性。

通过模拟器和Xcode的Canvas预览功能,可以快速检查应用程序在不同模式下的表现。

使用Swift UI的资产和外观设置,可以轻松调整应用程序的颜色以适应不同的显示模式。

在iPad上运行时,需要特别注意导航视图的样式,以确保用户体验。

通过简单的代码更改,可以调整应用程序以适应不同的设备和屏幕尺寸。

应用程序的简洁性意味着在适配不同模式和设备时不需要太多更改。

视频的最后,确认了应用程序在所有测试条件下的外观和功能都符合预期。

Transcripts

play00:00

[Music]

play00:05

what's up everyone

play00:06

i'm nick this is swiffle thinking and so

play00:09

far in this course

play00:10

we have only run our app on an iphone

play00:13

in portrait mode in light mode and in

play00:16

this video we're going to make our app

play00:18

adaptable for all the different ways we

play00:21

might deploy it

play00:22

and that means we're going to make sure

play00:23

that our app looks good and runs well

play00:26

in portrait as well as landscape mode it

play00:29

runs

play00:30

well on the iphone as well as the ipad

play00:32

and it looks good

play00:34

in light mode as well as dark mode

play00:37

welcome back guys uh in this quick video

play00:39

we're just gonna do a little bit of

play00:41

cleanup we're just gonna run through our

play00:43

app and make sure it looks good

play00:45

in dark mode as well as on the ipad

play00:48

and in landscape mode now this is a very

play00:51

simple app so i don't think we're gonna

play00:53

have much to actually do

play00:55

but i wanted to just run through this

play00:56

process for those of you who have maybe

play00:59

never dealt with any of this before and

play01:00

this is one of your first apps

play01:02

so let's start by just running our app

play01:04

as is on the iphone

play01:06

use the iphone 12

play01:11

and open it up on a simulator of course

play01:12

not in the preview

play01:15

and we're going to look at the colors

play01:16

first so the phone probably is going to

play01:18

be in light mode to begin with

play01:22

and we have our normal colors we have

play01:24

the purple going to maroon

play01:26

we have white backgrounds black text

play01:29

this all looks good

play01:30

if i go to the add screen again white

play01:33

backgrounds black text

play01:34

we have a gray text field which looks

play01:36

pretty good and a purple save button

play01:39

i don't think we have any issues here

play01:40

with the light mode but let's change

play01:42

our app here to go into dark mode so on

play01:45

the simulator i'm going to go to open

play01:47

these settings

play01:50

and in and in your settings on the

play01:51

simulator if you scroll down there

play01:53

should be a

play01:54

developer tab here so click open on the

play01:57

developer

play01:58

and then you can change the appearance

play02:00

there to dark mode

play02:02

so now the simulator should be in dark

play02:03

mode and let's open back

play02:05

up our app again and see what it looks

play02:08

like

play02:09

well immediately we can see that the

play02:11

background is now black which is good

play02:13

the text is white and that's because all

play02:15

of these texts are using the dot

play02:17

primary color and if you followed my

play02:19

swift ui boot camp

play02:21

you're well aware that the primary and

play02:22

the secondary colors

play02:24

are naturally dynamic so that they

play02:26

change between light and dark mode

play02:28

and this is good i do notice here that

play02:31

our

play02:31

colors the purple i can still see it

play02:35

but it is a little harder to read now

play02:36

that we are in dark mode because this is

play02:38

a dark purple on a black background

play02:40

so i think we should change that quickly

play02:43

so let's go into the assets.xc assets

play02:46

folder

play02:48

in the last video we set up our accent

play02:50

color

play02:51

and if i open up the inspector on the

play02:54

right side

play02:55

uh and i click on this color right now

play02:58

the appearances

play02:59

is none and that means we have a

play03:01

universal color so this accent color is

play03:04

universal gonna be dark purple so on

play03:06

light mode in dark mode no matter what

play03:08

mode it is it's going to be this dark

play03:09

purple

play03:10

but if we change the appearances we can

play03:12

add an any and

play03:14

dark and then we have a different

play03:16

appearance between

play03:17

any which is going to be our light mode

play03:19

and the dark mode so in the dark mode

play03:22

instead of having this dark purple i'm

play03:23

going to make it a little bit more of a

play03:25

lighter purple so that it's a little bit

play03:26

easier to read on this dark background

play03:29

so i'm going to click on the dark one

play03:30

i'm going to click on the show color

play03:32

panel

play03:33

and we're using this dark purple but i'm

play03:35

going to use maybe this lighter

play03:36

grape so i think that will be a little

play03:38

easier to read on

play03:40

the dark background i'm going to close

play03:42

that i'm going to do the same thing for

play03:44

the secondary accent color

play03:46

so click that i'm going to click on the

play03:47

color click on the appearances go to any

play03:51

and dark and in the dark mode

play03:53

let's click on show color panel and

play03:55

instead of this dark maroon i'm going to

play03:56

use this

play03:56

strawberry which is a little brighter a

play03:59

little easier to see in dark mode

play04:01

i'm going to just stop the preview press

play04:04

play on the simulator again

play04:07

and when it builds it should be in dark

play04:09

mode already but

play04:10

but the color should be our new dark

play04:12

mode colors so

play04:14

in dark mode i have this brighter purple

play04:16

which i think looks a little bit better

play04:18

and the secondary accent color is this

play04:20

brighter pink which actually looks

play04:22

awesome

play04:23

and now our colors are dynamic so if we

play04:26

switch back to light mode we're going to

play04:27

use that those starting colors and if we

play04:29

go back to dark mode

play04:30

we're going to use these new colors so

play04:33

this

play04:33

this is looking pretty cool let's go to

play04:35

the add tab to make sure that it looks

play04:36

good as well

play04:38

and there's only one issue i see here

play04:40

and it's that the placeholder in

play04:42

the dark mode has changed colors so we

play04:45

can't see

play04:46

the text right here that normally says

play04:48

uh add something here or whatever we put

play04:50

as the placeholder

play04:51

so let's just customize the background

play04:52

color on this really quickly

play04:55

so i'm going to jump into the add view

play05:00

so the background right now is this

play05:02

color literal that we added

play05:03

but let's use a dynamic color that will

play05:06

change

play05:06

and if you follow my swifty by boot camp

play05:10

you are also aware of some of the ui

play05:12

colors that we can import into swift ui

play05:15

and there are some ui colors that are

play05:17

dynamic

play05:18

like the primary and secondary colors

play05:20

like this text up here

play05:22

so we're going to use one of those

play05:23

instead of using this color literal so

play05:25

let's just delete this color literal

play05:28

delete this on the background and i'm

play05:29

going to call color

play05:31

open the parentheses and i'm going to

play05:33

type a ui color

play05:35

dot and then there's a bunch of ui

play05:38

colors that we can

play05:39

use here we have our regular colors as

play05:41

well as if we start typing in a system

play05:44

we'll see there's a bunch of system

play05:47

colors as well and we're going to look

play05:48

for the

play05:49

secondary system background

play05:52

and all these system colors are

play05:54

automatically dynamic so they will

play05:57

change between light and dark mode

play05:59

and now if we use the secondary system

play06:00

background i think it's going to look a

play06:02

little better

play06:03

let's press uh play on the simulator one

play06:06

more time

play06:07

see what it looks like

play06:10

and i'm gonna go to the ad this looks

play06:13

good i like this nice

play06:14

kind of grayish background we can see

play06:16

type something here still

play06:18

if we type it should say hello it's

play06:21

white text that looks good

play06:22

uh let's switch back to light mode

play06:26

just to make sure this new color still

play06:27

looks good in light mode

play06:29

and it does we have black text we have

play06:32

our gray background and it's looking

play06:33

great

play06:35

we're running this on a simulator i

play06:36

enjoy doing it on a simulator once we're

play06:38

like kind of finished with

play06:39

our app but just so you guys do know we

play06:42

can always

play06:43

open up the canvas

play06:48

and click resume on the canvas

play06:52

and the canvas right now is in light

play06:54

mode but we can change it by clicking

play06:56

this little computer thing here

play06:58

and changing the color scheme to dark

play07:00

mode

play07:02

so automatically change our canvas to

play07:04

dark mode if we scroll

play07:06

down on this project to the preview

play07:08

section

play07:09

we can see that the preferred color

play07:11

scheme is now dark and if we really

play07:13

wanted to we could add

play07:14

two different simulators here we could

play07:16

add a group

play07:17

open the brackets and i'm going to cut

play07:20

this navigation view and just paste it

play07:22

twice

play07:23

inside this group and this and the first

play07:25

one i'll make a light

play07:27

and second one i'll make dark and now we

play07:29

can see

play07:30

back to back we have our light mode on

play07:32

the right and if i scroll down we have

play07:35

our dark mode

play07:36

so if we didn't want to run the

play07:38

simulator and we had a lot of things to

play07:39

edit i would do it like this in our

play07:41

preview

play07:42

where we can check light and dark mode

play07:44

really quickly

play07:45

just for this screen but of course we

play07:47

didn't have much to do

play07:48

so using the simulator was fine it was

play07:51

easier

play07:52

and i think we're done with light and

play07:54

dark mode

play07:55

all right so this all looks great let's

play07:57

put it back in a dark mode just because

play07:59

we spent the entire

play08:00

video in light mode and dark mode looks

play08:03

really cool i think

play08:04

i think this looks awesome while we're

play08:07

here let's check this out by running it

play08:09

on

play08:09

landscape so we can just click this

play08:11

little button here

play08:12

to rotate the device and automatically

play08:16

we are rotated

play08:17

there wasn't much we had to do here um

play08:20

because when we formatted our screens we

play08:22

used things like

play08:23

max with we didn't set specific widths

play08:27

and our device automatically adjusted to

play08:29

be horizontal

play08:31

one thing i do want to change is that

play08:33

this whole no items area

play08:34

looks like it's maybe a little bit too

play08:36

wide for my liking

play08:38

so let's just limit the width on this no

play08:40

items area

play08:41

so i'm going to open up the no items

play08:44

view

play08:45

and maybe on the v stack

play08:49

yeah on the v stack right before the

play08:51

multi-line text alignment let's just do

play08:52

dot frame and let's give it a max width

play08:56

of maybe uh 400 i think would be good

play09:00

so when the device is in a portrait mode

play09:03

the width is about 350 or something like

play09:06

that and

play09:08

when it's in landscape obviously this is

play09:10

much wider

play09:11

but by setting a max width we can always

play09:13

just limit it

play09:15

when it is landscape or when it is on a

play09:17

larger device as well

play09:18

so if i press play one more time

play09:21

run it on this horizontal it should be a

play09:25

little bit in now and this looks a

play09:26

little bit better

play09:29

let's add an item make sure it looks

play09:31

good we'll say

play09:32

new item save and our new

play09:36

item shows up let's do one more another

play09:38

one

play09:40

save this is looking good it's all

play09:42

working we can go into edit mode

play09:45

and i don't see any other issues here so

play09:47

this is looking good on

play09:48

landscape let's put it back to

play09:52

portrait

play09:55

i'm going to close this simulator

play09:57

because it looks good on the iphone and

play10:00

the last thing i want to do in this

play10:01

video is check it on the ipad

play10:04

let's open up the ipad so i'm going to

play10:06

change so i'm going to change the

play10:07

simulator up here from iphone 12

play10:10

and i'm going to pick the iphone ipad

play10:12

pro 12.9 inch

play10:14

because it is the biggest so it will

play10:16

probably better

play10:17

test on that one and let's run the

play10:20

simulator one more time

play10:22

i'm going to pause the video quick

play10:23

because uh the fan is going crazy so

play10:25

i'll be right back

play10:27

so with the ipad pro selected let's

play10:29

press

play10:30

run on the simulator i don't think

play10:32

there's going to be much that we have to

play10:33

do here

play10:36

it should open up a new simulator let's

play10:38

do it in portrait mode first

play10:41

and when it loads uh

play10:45

we do have one little issue here because

play10:48

it did finish loading and we can't see

play10:49

anything and if i click on the back

play10:51

button

play10:52

it looks like the navigation view is

play10:55

adding

play10:56

our navigation on the left side and this

play10:59

is because on

play11:00

ipads and larger devices the navigation

play11:02

view has a different

play11:04

style by default and that style has this

play11:07

sidebar so we could have kind of tabs

play11:09

here and when we click these tabs it can

play11:11

open up other screens

play11:12

and we could still have that tab bar on

play11:14

the left side

play11:15

so this is a really cool ipad feature

play11:18

but it does not look good for what we're

play11:20

doing here of course

play11:22

so this is really easy to fix we're

play11:24

gonna jump into our

play11:26

to-do list app.swift file which is where

play11:29

we have our navigation view

play11:31

and on the navigation view we're just

play11:33

gonna very simply add dot

play11:35

navigation view style

play11:38

and then we're gonna start typing in

play11:40

navigation view

play11:42

style and here you can see a couple of

play11:44

the different styles

play11:46

and you can play around with these on

play11:47

your own time but

play11:49

stack navigation view style is the

play11:51

standard style where it's just one

play11:53

screen in front of the other

play11:55

so that's what we want we're gonna do

play11:56

stack navigation view style

play11:58

open and close the parentheses and let's

play12:00

run it one more time on the ipad

play12:02

and you will now see our app the way we

play12:05

wanted to see it

play12:07

and we have our first screen and we

play12:08

click add something we go to our second

play12:10

screen

play12:11

this all looks good i can type in hello

play12:14

let's add something this looks good to

play12:16

me

play12:18

and one thing you'll probably notice is

play12:19

that our no items view

play12:21

is still limited with that max width so

play12:24

instead of going to the full screen

play12:26

of the app because we added that

play12:29

that max width a couple minutes ago this

play12:32

now

play12:32

also is max width on our ipad as well

play12:35

which looks great

play12:38

let's lastly just rotate it horizontally

play12:41

make sure it still looks good and it

play12:43

does look good to me

play12:46

and that's pretty much it for this video

play12:48

we didn't do too much obviously because

play12:50

our app

play12:51

is so simple but we made sure it looks

play12:54

good in light and dark mode we adjusted

play12:56

some of the colors for dark mode

play12:58

we checked out our app in landscape as

play13:00

well as portrait in case the user wants

play13:02

to turn their device

play13:04

and then we checked it on ipad just to

play13:06

make sure it still looks good

play13:08

we updated the navigation view so that

play13:10

it's the correct style

play13:12

and now our app is pretty much ready to

play13:14

go

play13:15

so thank you guys for watching we have

play13:17

one more quick video before we finish

play13:18

this app but it's looking great you guys

play13:21

are doing awesome

play13:22

thank you for watching as always i'm

play13:24

nick this is swiffle thinking

play13:26

and i'll see you in the next video

play13:34

you

Rate This

5.0 / 5 (0 votes)

Étiquettes Connexes
应用适配横竖屏明暗模式iPadiPhoneSwift UI开发者教程动态颜色界面设计用户体验编程教学
Besoin d'un résumé en anglais ?