So I'm working on an app and I have created a spalsh screen as below:
Image 1
So Image 1 is the look and feel I want but I would like to add an automatic carrousel to display the text as shown in Animation 1 below:
Animation 1:
For Image 1, I have done the code below:
var body: some View {
GeometryReader { geometry in
VStack {
// Text("Hello, World!")
Spacer().frame(maxWidth: .infinity)
VStack {
NavigationLink(destination:
RegisterLoginView(isLoginScreen: true)) {
Spacer(minLength: 100)
MyButtonView(stringOfButton: login,
isInverse: true,
btnHeight: 40)
.padding(.leading, 10)
Spacer(minLength: 100)
}
NavigationLink(destination:
RegisterLoginView(isLoginScreen: false)) {
Spacer(minLength: 100)
MyButtonView(stringOfButton: register,
isInverse: false,
btnHeight: 40)
.padding(.leading, 10)
Spacer(minLength: 100)
}
}
}
.frame(maxHeight: .infinity)
}
.background(Image("guestBackground")
.resizable()
.aspectRatio(contentMode: .fill)
.edgesIgnoringSafeArea(.all))
}
As you see on the original image below, Image 1 only show the middle. So I would like to have Image 1 upgraded to :
- text in the middle of each view of animation 1 showing on Image1 and automatically sliding from one to the other. Only 3 slides.
- image right side for slide 1, middle of image on slide 2 and right side of image on slide 3. like when the text is displayed it looks like in background you are looking inside the appartment.
So it's look like you are moving in the image from left to right
Any idea?