Category "ios14"

How to pass @namespace to multiple Views in SwiftUI?

I'm playing with the new Xcode 12 beta & SwiftUi 2.0. .matchedGeometryEffect() modifier is great to do Hero animations. There is a new property @Namespace i

How to change PageTabView programmatically in iOS 14, SwiftUI 2?

I'm exploring new things came in Xcode 12 and SwiftUI 2.0 I have created a pageview onboarding screen with TabView and PageTabViewStyle in Xcode 12, iOS 14, Swi

SwiftUI app life cycle iOS14 where to put AppDelegate code?

Now that AppDelegate and SceneDelegate are removed from SwiftUI, where do I put the code that I used to have in SceneDelegate and AppDelegate, Firebase config

iOS 14 UIColorPicker eyedropper tool not returning selected color

I am currently trying to implement the new iOS 14 UIColorPicker. Everything works great, except the eye dropper functionality of the UIColorPicker. After select

How to use UIApplicationDelegateAdaptor as ObservableObject?

In my iOS 14 App, I can register the legacy AppDelegate by doing this: @main struct MyApp: App { #if os(iOS) @UIApplicationDelegateAdaptor(AppDeleg

Accessing AppState in AppDelegate with SwiftUI's new iOS 14 life cycle

I'm using SwiftUI's new app lifecycle coming in iOS 14. However, I'm stuck at how to access my AppState (single source of truth) object in the AppDelegate. I ne

Open UIDatePicker programmatically in iOS 14

I have this normal UIDatePicker (sorry that it's not in English, please ignore that): But the problem is that it only appears when I'm pressing the Date Picker

SwiftUI 2.0 List with children - how to make the tappable area of the disclosure button cover the whole list item

I am making a SwiftUI app for iOS 14, and I have a sidebar list that uses the new children: attribute of list to make the list expandable: However, at the momen

Incorrect Video Time using mpeg4AppleHLS swift

I am creating MPEG-2 video files using mpeg4applehls profile type in avassetwriter, the videos duration or start time are wrong. I create 5-second video segment

iOS14, WKWebView cannot open links with _blank target

I have WKWebView that I want to use to browse a certain web site. However some links with target="_blank" are not always opening. From run to run, I get differe

Change GroupBox background color in SwiftUI

How can I change the default gray background color of a GroupBox view in SwiftUI? I tried adding a background modifier, but this just changes the white backgrou

iOS 14 Medium Widget Size Background Image Refuses to Fill

For some reason I'm unable to get an image background to aspectFill correctly in XCode Version 12.0, but only on the .systemMedium widget size. It seems to work

How to use view modifiers only available for iOS 14+ with deployment target of iOS 13

How can you add a view modifier to a view when it's only available on iOS 14 but your app is available for iOS 13? For an example, textCase(_). Section headers

Simple SwiftUI Background Image keeps moving when keyboard appears

This is driving me nuts. There seems to be new behaviour for handling background images in iOS14. Desired effect is: a fixed background image that fills the scr

Fixing the size of a custom font in SwiftUI iOS 13+ when ignoring Dynamic Type

In an app I'm developing (SwiftUI for iOS13 and above), I have imported a custom font, and I load the font using the following method": func getDigitalXFontOfS

SwiftUI Word Wrap for multiline text Word Hyphenation Problem

I'm facing the following problem with SwiftUI Text: In the following example SwiftUI breaks the word "Amazement" into "amazeme" on the first line and "nt" on th

How to make a SwiftUI DocumentGroup app without starting on the file picker?

If a user uses the Document App template in Xcode to create a SwiftUI app, macOS starts them off with a new document. This is good. I can work with that to pres

How to add the AppTrackingTransparency permission to your iOS apps

I am extremely new to iOS, with no iOS development experience at all, however, I've been given a task that's related to preparing for iOS 14+. Based on what I'v

How to trigger UIContextMenuInteraction context menu programmatically?

I have set up an UIButton as the rightBarButtonItem in an UIViewController inside an UINavigationController and associated an iOS13 context menu to it. Long pre