Is it possible to create a second line in a Toolbar in SwiftUI like in Preview?
Related
I am trying to create the same experience where a sheet is presented in one of the tab items of a TabView - not covering the tabs.
I am using .presentationDetents() and SwiftUI4.0 for that.
See example of Apple's own app doing that
The sheet is covering the child view inside TabView.
However, instead in my own code I am getting
this - the tabs of the parent view are covered by the modal sheet
The link https://developer.apple.com/forums/thread/711702 suggests that it is not possible to achieve the same behaviour you see in Apple's Maps and Find My apps with the current SwiftUI API.
I want to go from one view to another with the click of a button. Like if I press Log In, it goes to the "Home" view.
I tried to use NavigationLink, but it needs a NavigationView, which I don't want to do because it messes with the format of the app on macOS. What is an alternative to NavigationLink to get from one view to another?
SwiftUI can easily present a sheet view on top of the existing review when a condition is met (see screen record below). What is the sheet component equivalent in UIKit?
Tried to Google a result and it looks like there is a sheet related view called UIActionSheet, but that does not seem like the right UI control.
REFERENCE
Example of how to achieve the same behavior with UIKit.
iOS 14 navigation bar title is not displayed in UINavigationController created programmatically
This is just another UIViewController presented modally with a Done UIBarButtonItem on the right side.
I created a new Xcode project from the 'Tabbed App' template using SwiftUI.
I would like to modify the spacing (margin or padding) between the tab items.
Is there a way to do this?
Is it possible to create Xcode widget in Xcode 12 but without the use of SwiftUI and instead use XIB files to construct the Widget UI?
Widget protocol is only available in SwiftUI framework, so you can only create widgets using SwiftUI.
https://developer.apple.com/documentation/swiftui/widget
Update
You can't use UIKit views wrapped in UIViewRepresentable within SwiftUI for Widgets, It will appear blank.
https://developer.apple.com/forums/thread/653471
No, due to performance and battery life concerns, WidgetKit only works with SwiftUI.
https://developer.apple.com/documentation/widgetkit
You configure the widget with a timeline provider, and use SwiftUI views to display the widget’s content. The timeline provider tells WidgetKit when to update your widget’s content.