ios14

SwiftUI disable list border iOS 14 [duplicate]

折月煮酒 提交于 2020-12-26 08:19:25
问题 This question already has an answer here : SwiftUI iOS14 - NavigationView + List - Won't fill space (1 answer) Closed 3 months ago . I found the list in SwiftUI iOS 14 will have something like border if the view contained navigationView. Is there any solution to disable the border? Coz the border break the design of my application. Here is the code that contained no NavigationView inside the code. struct ContentView: View { @State var isPresent = false var body: some View { let first =

Cordova app stuck on splash screen on iOS 14 Beta

故事扮演 提交于 2020-12-26 06:57:40
问题 I have a plain Cordova app and when I run it on iOS 14 beta the app gets stuck on the splash screen and there are few warnings/errors logged in XCode but I am not sure whether it is causing the problem. I have created a blank Cordova app to test whether it works on iOS 14 and when I run it on the device the app worked as expected but when I set the app to use WKWebView instead of UIWebView the app got stuck on the splash screen. I have added the below preferences to use the WKWebView in

Fetch data from CoreData for iOS 14 widget

浪尽此生 提交于 2020-12-22 06:26:20
问题 I want to display data fetched from Core Data in a widget. But @FetchRequest doesn’t work on widgets. As I understand, we have to create an app group and make a shared persistent container. What I want to know is how to read (fetch) data on widgets from that shared persistent container or simply, how to display data fetched from Core Data in widgets . 回答1: First you need to create an AppGroup which will be used to create a Core Data Persistent Container (here is a good explanation how to do

Fetch data from CoreData for iOS 14 widget

若如初见. 提交于 2020-12-22 06:26:13
问题 I want to display data fetched from Core Data in a widget. But @FetchRequest doesn’t work on widgets. As I understand, we have to create an app group and make a shared persistent container. What I want to know is how to read (fetch) data on widgets from that shared persistent container or simply, how to display data fetched from Core Data in widgets . 回答1: First you need to create an AppGroup which will be used to create a Core Data Persistent Container (here is a good explanation how to do

SwiftUI iOS14 GeometryReader Invalid frame dimension

余生长醉 提交于 2020-12-13 18:56:17
问题 My GeometryReader was working fine in iOS13 but now in iOS14 i get a thread issue. "Invalid frame dimension (negative or non-finite)." I printed the size that the reader should give back and it looked fine. The app is still basically working, but looks a bit weird, because there is some padding introduced. Does anyone have any ideas how to tackle this? 来源: https://stackoverflow.com/questions/64027041/swiftui-ios14-geometryreader-invalid-frame-dimension

SwiftUI iOS14 GeometryReader Invalid frame dimension

这一生的挚爱 提交于 2020-12-13 18:55:21
问题 My GeometryReader was working fine in iOS13 but now in iOS14 i get a thread issue. "Invalid frame dimension (negative or non-finite)." I printed the size that the reader should give back and it looked fine. The app is still basically working, but looks a bit weird, because there is some padding introduced. Does anyone have any ideas how to tackle this? 来源: https://stackoverflow.com/questions/64027041/swiftui-ios14-geometryreader-invalid-frame-dimension

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

孤者浪人 提交于 2020-12-12 05:12:32
问题 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 need the AppDelegate to run code on startup and register for notifications ( didFinishLaunchingWithOptions , didRegisterForRemoteNotificationsWithDeviceToken , didReceiveRemoteNotification ) etc. I am aware of @UIApplicationDelegateAdaptor but then I can not e.g. pass an object through to the AppDelegate with a constructor. I guess the

How to modify UIMenu for UIBarButtonItem and UIButton

白昼怎懂夜的黑 提交于 2020-12-06 04:36:00
问题 iOS 14 adds the ability to display menus upon tapping or long pressing a UIBarButtonItem or UIButton, like so: let menu = UIMenu(children: [UIAction(title: "Action", image: nil) { action in //do something }]) button.menu = menu barButtonItem = UIBarButtonItem(title: "Show Menu", image: nil, primaryAction: nil, menu: menu) This most often replaces action sheets ( UIAlertController with actionSheet style). It's really common to have a dynamic action sheet where actions are only included or may

How to modify UIMenu for UIBarButtonItem and UIButton

一个人想着一个人 提交于 2020-12-06 04:35:33
问题 iOS 14 adds the ability to display menus upon tapping or long pressing a UIBarButtonItem or UIButton, like so: let menu = UIMenu(children: [UIAction(title: "Action", image: nil) { action in //do something }]) button.menu = menu barButtonItem = UIBarButtonItem(title: "Show Menu", image: nil, primaryAction: nil, menu: menu) This most often replaces action sheets ( UIAlertController with actionSheet style). It's really common to have a dynamic action sheet where actions are only included or may

How to modify UIMenu for UIBarButtonItem and UIButton

社会主义新天地 提交于 2020-12-06 04:35:05
问题 iOS 14 adds the ability to display menus upon tapping or long pressing a UIBarButtonItem or UIButton, like so: let menu = UIMenu(children: [UIAction(title: "Action", image: nil) { action in //do something }]) button.menu = menu barButtonItem = UIBarButtonItem(title: "Show Menu", image: nil, primaryAction: nil, menu: menu) This most often replaces action sheets ( UIAlertController with actionSheet style). It's really common to have a dynamic action sheet where actions are only included or may