Post

Replies

Boosts

Views

Activity

TabView and Full Screen Background Image
Hi I have a TabView and I would like a background image to cover the full screen. Here is the code I'm struggling with: struct ContentView: View { var body: some View { ZStack { Image("background-image") .resizable() .scaledToFill() .edgesIgnoringSafeArea(.all) TabView { AssetsView() .tabItem { Label("Assets", systemImage: "books.vertical.fill") } FavouriteView() .tabItem { Label("Favourite", systemImage: "star.fill") } } } } No matter what I try, I can't seem to get my "background-image" to display. I thought I might just have the background image only on AssetsView but that wasn't successful either. Any ideas would be appreciated.
1
1
676
Apr ’24
LLDB RPC Crash in Xcode Playgrounds
Hi, upgraded to Xcode Version 16.3 (16E140) today and now Playground can't execute JSON decoding. The code below is taken from Apple's own JSONDecoder example: struct GroceryProduct: Codable { var name: String var points: Int var description: String? } let json = """ { "name": "Durian", "points": 600, "description": "A fruit with a distinctive scent." } """.data(using: .utf8)! let decoder = JSONDecoder() let product = try decoder.decode(GroceryProduct.self, from: json) print(product.name) // Prints "Durian" This use to work in the previous Xcode version. Now I get this error: The LLDB RPC server has crashed. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. This file doesn't exist in the location. I've restarted Xcode and the Mac, same error. Any thoughts?
1
1
105
Apr ’25
UserDefaults on App Launch
Hi On first launch (after download) of my app I display a "terms and conditions" consent screen. When the user taps agree, I set a Bool value in UserDefaults, so on next launch, the user is not prompted again. Pretty stock standard approach. I've had some users report that if the app is in the background for an extended period of time, the "terms and conditions" screen will re-appear when brought back into the foreground. But if the app was terminated after use and then re-launched, then behaviour is as expected - the "terms and conditions" screen is not shown. Is the better approach to use a file instead? Thanks
5
0
2.6k
Nov ’21