DoubleColumnNavigationViewStyle, on iPad, left an unusable space at the top.
It seems to be a navigation bar's title, but the navigation bar code apply to the main navigation bar.
Is there a way to hide, or at least use, the inner navigation bar?
The sample code below reveals part of the screen unused by the App.
import UniformTypeIdentifiers
@main struct RugbyTimeApp: App {
@SceneBuilder var body: some Scene {
DocumentGroup(
newDocument: {() -> ReferenceDocument in ReferenceDocument()},
editor: {_ -> MainView in MainView()}
)
}
}
struct MainView: View {
var body: some View {
NavigationView {
Text("Side View")
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(Color.green)
Text("Hello world")
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(Color.red)
}
.navigationViewStyle(DoubleColumnNavigationViewStyle())
.navigationTitle("Nav Title")
.toolbar
{
ToolbarItem(placement: .navigation, content: {Button("Next page", action: {})})
}
}
}
class ReferenceDocument: ReferenceFileDocument {
static var readableContentTypes = [UTType.plainText]
init() {}
required init(configuration: ReadConfiguration) throws {}
func snapshot(contentType: UTType) throws -> Int {return 0}
func fileWrapper(snapshot: Int, configuration: WriteConfiguration) throws -> FileWrapper {
let data: Data = try JSONEncoder().encode(snapshot)
return FileWrapper(regularFileWithContents: data)
}
}
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I'd have a speech at a begin of a long pressure:
class Cell: UITableViewCell
{
override func awakeFromNib()
{
...
let willSpeech = UILongPressGestureRecognizer(target: self, action: #selector(longPress(gesture:)))
button.addGestureRecognizer(willSpeech)
}
@objc func longPress(gesture: UILongPressGestureRecognizer)
{
switch gesture.state
{
case .began:
let utterance = AVSpeechUtterance(string: "hello")
let speechSynthesizer = AVSpeechSynthesizer()
speechSynthesizer.speak(utterance)
...
}
}
}
But the speech start only when the button is released.
Is there a way to let the speech start immediately even during a long pressure gesture recogniser?
On MacOS popups have opacity < 1.
in Dark Mode, text on popup over a clear background isn't visible clearly.
How to change the opacity of the popup?
The Apple Distribution certificate is present in the login Keychain, as well as the Development one.
In Xcode preferences both are visibile and valid.
In Xcode target only the development certificate is present and I'm unable to set the distribution one.
For this reason my last app has been refused on the Apple Store Connect.
How can I set the distribution certificate on the App target?
I agree with Apple Human Interface Guidelines that states "Design a launch screen that’s nearly identical to the first screen of your app", but:
A SwiftUI App for both macOS and iOS cannot have a storyboard Launch Screen
Images can be scaled only at: 2x/3x, Compact/Regular, iPhone/iPad
Launch Screen can have central, top (Navigation bar) and bottom (Tab Bar and Toolbar) images
Launch screen images are centered in the screen space
Launch screen images are stretched to fill the screen space
With the rules above, I'm unable to create launch screens for every screen size. If the image in the asset is sized for a small screen, i.e. an iPhone SE, it will be distorted in a 'long' screen, i.e. an iPhone 14, and viceversa.
Have I missed some possibility to better define how to define or manage the launch screen images?
With "Requires full screen" Split View and Slide Over are disabled but the line on the bottom of the screen remains.
How can that line removed as when a video is displayed full screen?
Topic:
UI Frameworks
SubTopic:
General