Skip Navigation
Devon Devon @kbin.social

iOS developer. Working on iGPT, a native iOS platform for utilizing your OpenAI API key. Open to collaboration and full-time positions. DM me!

Posts 6
Comments 5

How do you get screenshots with the proper status bar on iOS 16-17?

How do you get screenshots with the proper status bar on iOS 16-17?

I've been ready to submit my app to the App Store for weeks, but I've been putting it off because I can't figure out how to modify the simulators' status bars to get the Apple-recommended layout.

I've followed various tutorials to update the simulators, but it seems that it's not possible on current iOS versions, and my app's minimum deployment is higher than when it quit working.

At this point, I've got a flow setup to easily get all screenshots I need without status bars. Is there any way to automate adding the proper toolbar to the screenshots, or will I need to manually edit every single picture?

\#SwiftUI

0
Undo a backward move when using NavigationStack
  • @roydbt I know this is a bit old now, but just in case. I don't believe there is a native solution for your problem. Even creating a custom navigation bar back button while hiding the real one means you lose swipe-ability for navigation unless you implement a custom solution.

  • How can I "punch out a hole" in a scrollable view's background with the view's content?

    I know that probably sounds weird, but let me explain.

    I have a scroll view with custom shapes that are dynamically sized. The goal is to have some of those shapes, the ones on one side of the scroll view, basically be see-through to reveal the contents of a large gradient underneath. Therefore, as the shapes scroll up or down the view, their background would change as they move over the gradient.

    However, the rest of the scroll view, including the other shapes and the blank areas in between, should not be see-through but instead have the default system background color. The other issue I've run into is that the gradient must not be visible until content is loaded in so you don't see the gradient flash in the little in-between time.

    Currently, I have the scroll view itself having the gradient as the background. With a combination of adjusting my shapes to use even/odd filling, making my see-through shapes transparent, and adding "background covers" on all sides of the shapes, I almost have the desired results.

    Problems: The background is exposed when the list is dragged down. The gradient does not continue off the screen, so the see-through messages disappear before the opaque messages. This is especially problematic for the production environment because of semi-transparent bars on the top and the bottom, meaning I can't extend the gradient unless I keep it covered in the safe areas. In production, the scroll view content does not load immediately but has an opacity transition on appear. So, the gradient flashes as the content loads.

    2 and 3 I may be able to tinker with and find a solution. I haven't spent much time trying yet. But, I'm thinking I may be approaching this problem in a less-than-optimal way. The ideal situation would be to have a gradient the size of the device height that is only visible through a particular view on top of it while being unexposed in all other situations.

    Here's a brief code example.

    Also, I considered actively calculating the gradient's appearance on the shapes as they scroll based on their scroll position, but my gut tells me performance will be an issue with that.

    0
    4 days before reddit's 3rd party app shutdown, Lemmy daily active users has skyrocketed 1400% this month
  • @MicroWave I had never heard of the Fediverse or kbin before the protests on Reddit. I’m really hoping this all takes off. I’ve been enjoying my time here so far.

  • Completely free resource with loads of SwiftUI tutorials.
  • @conciselyverbose

    community-sourced recipes

    That’s in the first paragraph of the “Online Cookbook” tab of the website. I would assume that means the recipes are free to use.

    All the recipes are open source and live in the Recipes folder in the Git.

    That’s on the GitHub page for the app and Xcode extension for the website. I think you’re good, but if you work for somebody, maybe just ask your manager first. If you’re indie, I wouldn’t sweat it.

  • Is it expected behavior that reading an empty NavigationPath back into memory from UserDefaults and then using that path for navigation breaks the app? Nothing renders on the screen, even though my Vi

    Is it expected behavior that reading an empty NavigationPath back into memory from UserDefaults and then using that path for navigation breaks the app? Nothing renders on the screen, even though my View that should render has its onAppear trigger, and there’s no errors. If the loaded path isn’t empty, it works as expected.

    I’ve gotten around this issue by checking if the loaded path is empty, and creating a new one if so. This doesn’t seem right, though.

    I was following along with Apple’s tutorial pretty closely. The only other thing I really changed was the .onChange of scenePhase, because it wasn’t triggering as they wrote it. I instead observed the path for changes.

    \#SwiftUI

    0
    Programmer Humor @kbin.social Devon @kbin.social

    $100k salary, pls

    0
    My app "‎Kolibri for SwiftUI" let's you design vector graphics and generates automatically the SwiftUI code and now you can animate your designs too
  • @Sandro very cool! I’ve seen you post this on Reddit and always thought it’d be useful to check out, but the code is only half the battle. I don’t think I’ve got the artistic or design skills to really make much use of it. The app I’m building’s logo is a rounded rectangle with an emoji on top lol.

  • Completely free resource with loads of SwiftUI tutorials.

    swiftuirecipes.com Recipes | Swift UI recipes

    SwiftUI can be confusing and frustrating, so this site gathers no-nonsense, straight-to-the-point recipes on how to get sh*t done!

    I don't know how well-known this resource is, but I just came across it and figured I'd share it with y'all. I've already found a couple of interesting tutorials (or "recipes" as they're called on the site) that I haven't seen elsewhere.

    3
    What is new in SwiftUI after WWDC 23
  • I’m eager to try out Swift Data. Seems way more intuitive and Swifty than Core Data. The headset is definitely on my wish list, too.

    ETA: Wow, taking the time to go through the whole blog post, I am SO excited for what’s coming. So many problems I’ve run into recently are getting addressed. SwiftUI may not be perfect yet, but Apple is getting it closer and closer every year.