This sample code colorise the navigation bar, but while the window is in fullscreen or in splitView on the Mac, only the left sidebar is colorised.
How can be the full navigation bar be colorised also on full screen?
var body: some Scene
{
WindowGroup
{
NavigationSplitView
{
ForEach(1..<3) { (i) in Text("\(i)") }
}
detail:
{
ForEach(1..<3) { (i) in Text("\(i)") }
}
.toolbarBackground(.yellow)
}
}
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
On App Store there is the new request to declared if I am a trader operator or not under the new EU law.
As many I'm a single developer so the declaration can be reduced to "any natural person [...] who is acting [...] for purposes relating to his or her trade, business, craft or profession.", to learn more Apple links to EU commission.
I'm not 100% sure if, a single developer whit very small business and which use only Apple Store to distribute its apps, can declared "This is the account of a supplier who is not a trader".
Is someone more legal expert than me able to replay?
In iOS 12 and 13, up to 13.4, few lines of codes:navigationController?.navigationBar.isTranslucent = falsenavigationController?.navigationBar.barTintColor = .blacknavigationController?.navigationBar.tintColor = .redallow to hide the status bar under the navigation bar.With swiftUI is perhaps even simpler.statusBar(hidden: hideStatusBar)but it requires to rewrite the whole app from storyboard to swiftUI.Hiding the status bar, or go to full screen, is still be possible without using swiftUI on legacy code?
I have a storyboard based project with UIPickerView and I like to port it on the Mac with "Optimised Interface for Mac".
My idea was to: In the storyboard disable installation of the UIPickerView for idiom=Mac variation.
In the code substitute UIPickerView with SwiftUI Picker.
What I obtained is the error: "UIPickerView is not supported when running Catalyst apps in the Mac idiom".
This error is caused by the SwiftUI Picker (it is present even if remove UIPickerView and all its references).
If both the UIPickerView and the SwiftUI Picker cannot be used in a storyboard based project, how can a generic Picker behaviour be obtained in a storyboard based project compatible with Mac idiom?
Studing SwiftUI in Apple's HandlingUserInput, I'm blocked in this error:No ObservableObject of type UserData found. A View.environmentObject(_:) for UserData may be missing as an ancestor of this view.The code is:final class UserData: ObservableObject {
@Published var showFavoritesOnly = false
@Published var landmarks = landmarkData
}struct LandmarkList: View {
@EnvironmentObject var userData: UserData
var body: some View {
NavigationView {
List(landmarkData) { landmark in
if !self.userData.showFavoritesOnly || landmark.isFavorite {
NavigationLink(destination: LandmarkDetail(landmark: landmark)) {
LandmarkRow(landmark: landmark)
}
}
}
.navigationBarTitle(Text("Landmarks"))
}
}
}
struct LandmarkList_Previews: PreviewProvider {
static var previews: some View {
LandmarkList()
.environmentObject(UserData())
}
}".environmentObject(UserData())" is present in the preview."@EnvironmentObject var userData: UserData" in the View.But the use of userData (if !self.userData.showFavoritesOnly) cause the fatal error.Can someone help me in undertanding how to proceed?
Since Xcode 11 setting iPad and Mac in General / Deployment Info fo a target enable it to run in iPad as well as in iMac.
When I try to run on the iMac a document app, even the very simple one created by the Xcode on its template, it fails with the error:
If the app is a document app running it in a Mac fails with the error: [OpenSavePanels] ERROR: Unable to display open panel: your app is missing the User Selected File Read app sandbox entitlement. Please ensure that your app's target capabilities include the proper entitlements.
What have to be added in the project to let a document app running on iPad as well as on iMac?