Post

Replies

Boosts

Views

Activity

Reply to Image slider
import SwiftUI struct Tab1: View { private var numberOfImages = 3 private let timer = Timer.publish(every: 10, on: .main, in: .common) .autoconnect() @State private var currentIndex = 0 var body: some View {   GeometryReader { proxy in   TabView(selection:$currentIndex) {     ForEach(0..<numberOfImages) {num in Image("\(num)")       .resizable()       .scaledToFill()        .overlay(Color.black.opacity(0.4))       .tag(num)  } }.tabViewStyle(PageTabViewStyle())       .clipShape(RoundedRectangle(cornerRadius: 10)) .frame(width: proxy.size.width, height: proxy.size.height/ 3)          .onReceive(timer, perform: { _ in                 withAnimation {                 currentIndex = currentIndex < numberOfImages ? currentIndex + 1 : 0                 }             })         }      } } struct Tab1_Previews: PreviewProvider {     static var previews: some View {         Tab1()     } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’21
Reply to SwiftUI. Want to code in each page that’s connected to the tabBar
No that wasn’t it. I already have my tabBar done. I just wanna code what’s going to be in the pages. Not the tabBar.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’21
Reply to Recipes App | SwiftUI | Creating the pages
Wait omg, it works, it works, OMG THANK YOU. SO SO SO MUCH. THANK YOU
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’21
Reply to Image slider
import SwiftUI struct Tab1: View { private var numberOfImages = 3 private let timer = Timer.publish(every: 10, on: .main, in: .common) .autoconnect() @State private var currentIndex = 0 var body: some View {   GeometryReader { proxy in   TabView(selection:$currentIndex) {     ForEach(0..<numberOfImages) {num in Image("\(num)")       .resizable()       .scaledToFill()        .overlay(Color.black.opacity(0.4))       .tag(num)  } }.tabViewStyle(PageTabViewStyle())       .clipShape(RoundedRectangle(cornerRadius: 10)) .frame(width: proxy.size.width, height: proxy.size.height/ 3)          .onReceive(timer, perform: { _ in                 withAnimation {                 currentIndex = currentIndex < numberOfImages ? currentIndex + 1 : 0                 }             })         }      } } struct Tab1_Previews: PreviewProvider {     static var previews: some View {         Tab1()     } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’21
Reply to Image Slider not ignoringsafearea
this issue has been solved. all that needed to be done was to ignoresafearea behind the .frame.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’21
Reply to Bundle Identifier
https://developer.apple.com/forums/thread/29165 ill think you’ll find your answers here. :)
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Single app free on iOS and paid on macOS
I’m not sure, but im quite certain that you can’t do that cause they both uses AppStore. In that case maybe you can launch it and then like you said, rename it to the AppStore but im not certain it will be accepted through testing since you’ve already launched a free version of the product and then want to launch a pay-to-play product.
Replies
Boosts
Views
Activity
Sep ’21
Reply to SWIFTUI Image Slideshow using TabView not working
Solved
Replies
Boosts
Views
Activity
Nov ’21
Reply to What’s the name of the function.
Of course! I would call it an image slider, but im not sure that it’s called that?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Thread 1 ERROR MESSAGE
Issue has been solved.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jan ’22