Post

Replies

Boosts

Views

Activity

Reply to I want to determine the current view display in SwiftUI
You could for example have a variable which gets written to by each view controller as it loads, thus keeping a record of the last loaded view controller. Or you could recursively scan the view controllers to determine what's at the top, I did that in one of my app's, the code is below. Its specific to the structure of my app but you get the general idea. extension UIApplication {     class func topViewController(_ base: UIViewController? = UIApplication.shared.keyWindow?.rootViewController) -> UIViewController?     {         if let nav = base as? UINavigationController         {             if nav.visibleViewController is UIAlertController             {                 let top = topViewController(nav.viewControllers.last)                 return top             }             else             {                 let top = topViewController(nav.visibleViewController)                 return top             }         }                  if let tab = base as? UITabBarController         {             if let selected = tab.selectedViewController             {                 let top = topViewController(selected)                 return top             }         }                  if let presented = base?.presentedViewController         {             if presented is UIAlertController             {                 return base             }             else             {                 let top = topViewController(presented)                 return top             }         }         return base     } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’23
Reply to Rejected App
In my experience with App Store reviewers, they are not based in the US and English is not their first language nor a strong language in many cases. With you application and the use of the word happy that could perhaps lead to some mis-assumptions on their part. A happy number implies a fun or child like app, which is what the reviewers may think it is. Have you tried emphasizing the mathematical nature of your app to them, steering away from phrases like happy?
Jan ’23
Reply to "ITMS-90338: Non-public API usage - The app references non-public selectors" issue still present when uploading to TestFlight, except now its preventing builds from appearing
Several days ago I uploaded a build to Testflight successfully, I just uploaded the identical version (just bumped the build number, that was the only change) and re-uploaded it, I just got the above error and the build isn't showing in Testflight (it appeared briefly for about 10 seconds saying processing then then vanished). So this is defiantly an Apple back end bug.
Feb ’23
Reply to Operating system
Many years ago I worked as part of a team creating an operating system for a mobile device, it was a team of about 50 people and it took about 3 years to get the first version ready. You think you can create an entire operating system on your own and by assistance from a forum?
Apr ’23
Reply to I want to be a developer but have no experience
You can learn how to code for iOS from books and tutorials, but unless you do something like enroll in a programming course that teaches you the fundamentals and principles of design and code, then the chances are you won't achieve your goal to become a good developer, you'll be somebody who can create an iOS app but is probably designed like crap and implemented terribly and is working tenuously and will fall apart with a slight change. If it works as you intended maybe that doesn't matter to you, but you did say good developer was your goal as opposed to a goal of being able to develop an iOS app. Sorry to sound so negative, but it's just the truth.
Topic: Programming Languages SubTopic: Swift Tags:
May ’23