Post

Replies

Boosts

Views

Activity

Moving App to Background and Pulling it Back to the Foreground
I have a very specific request. I am building an app where I keep track of date/time (count down) until the next scheduled event. This all works fine. My problem is I need to either quit the app, but leave a timer running in the background, then periodically check to see if the event (date/time) is at hand. Or minimize the app (move the app to the background) and keep track of the time periodically to wake, then bring the app back to the foreground. The process would be similar to an alarm clock app. I need to know how to: Suspend the app (move to the background). Have the app keep track of the time where it is at in the process. Bring the app to the foreground once I reach the date/time of the event. I also need to understand how to make an alarm ring until I hit Snooze or Done. The alarm sound needs to run parallel to the app so the app keeps working while I respond to the alarm. I am using SwiftUI 2 and Swift 5.3 with IOS 14.3 and Xcode 12.3. I don't have any experience with Objective C. I cannot find anyone who can help with this. Can anyone recommend a resource (documentation, training, etc), that would help me accomplish this? I can and will write a small demo app if needed, but at the moment, I just need some direction on resources on how to accomplish this. I have to believe this can be done, but I am at a loss on how to do it and have been unable to find any resources to accomplish this. Any help is greatly appreciated.
1
0
783
Dec ’20
SwiftUI TabView - Can't access views with more than 5 tabs
I recently switch to SwiftUI and after figuring out the syntax and how it works, I am really loving the simplicity of building apps.Recently, I ran into an issue where I created a TabView and assigned different views to each tab. It worked fantastic until I created more than five tabs. What I did is I create seven tabs and because there wasn't enough room on the device to display all seven, TabView creates a "More" tab. When I tap on the More tab, it takes me to a new view where the last two tabs are now in a list. Here is where I run into a problem. I tap one of the tabs in the list and it takes me to a blank view rather than taking me to the view I assigned to the tabItem. I know the tab works because when I have less than five tabs on the page the same tabitems work as expected. However, these same tabItems don't work when they are in the list generated from the "More" tab.Is this a bug or is there something different I need to do once I exceed 5 tabs? I haven't found anything on the subject so I thought I would ask more seasoned SwiftUI developers.Any information you can provide is greatly appreciated.Thank you.
2
0
1.7k
Mar ’20