Questions tagged [contentview]
39 questions
0
votes
1 answer
In Xcode 14.3.1 using SwiftUI and preview, why doesn't the preview display both of my Views? (It shows them on separate previews)
My app is made up of two Views.
When I run it on the emulator, it looks like the following (minus the red bar - I added that to the image to make explaining this a bit easier):
All of the controls above the red line are in one View and the one…

raddevus
- 8,142
- 7
- 66
- 87
0
votes
1 answer
view leaves a huge gap at the top
I display simple view with two text fields inside a vStack/HStack combination. It leaves a huge gap at the top as shown on the attached image. I tried vStack, it has .leading and .trailing which justifies left or right. How can set specific spacing…

vrao
- 545
- 2
- 12
- 33
0
votes
1 answer
ShowPopupAsync inside a contentview in .net MAUI
I created two pages in maui app: a ContentView and a ContentPage. Inside the ContentView component, I need to call a popup and show some contents in the page. In my current Implementation on ContentView, I declared a bindable property of type…
0
votes
0 answers
Getting a error in Xcode when content gets out of frame
I have always found app development to be very interesting, so I started learning more about Swift in Xcode. Currently, I am working on creating an overview page for cars that are on sale, but I have run into an issue with the content going outside…

Berk
- 85
- 1
- 6
0
votes
0 answers
Updating variables from outside ContentView and drawing paths based on those variables
I've been trying to learn Swift as a hobby. I've been progressing fairly well, however I've been writing my programs using the command line tool template which makes it quick and easy but also means that I have not learned about views and…

Bibbs1000
- 23
- 3
0
votes
2 answers
Updating of property values & bindings in .NET MAUI ContentView
I'm attempting to try my hand at creating a card-based UI similar to Android's CardView layout using MAUI ContentView. The exemplary use case for such an element is the display of testing or scoring results, so I attempted to roll in some of the…

ecfedele
- 306
- 3
- 15
0
votes
0 answers
How to omit setter of PropertyChanged when the framework draws controls [MAUI.NET]
I have an application in MAUI.NET with MVVM architecture.
In ViewModels I am setting PropertyChanged as most of examples through the web.
In my application the user opens lots of views (that are of type ContentView).
Each time the ContentView is…

jaydopartu
- 63
- 1
- 8
0
votes
1 answer
Can't bind property for ContentView control
I have a ContentView called HomePageOrientationViewLoader that I want to use in a ContentPage called HomePage. HomePageOrientationViewLoader will either load a ContentView called HomePageLandscape if the orientation is in Landscape or a ContentView…

David Pugh
- 758
- 3
- 12
- 33
0
votes
3 answers
In .NET MAUI is there a way to choose a different XAML view based upon whether the device is in Landscape or Portrait
I am using .NET MAUI and I have a particular view that is rather complicated and I would rather have a different layout if the device orientation is in Portrait vs if the device orientation is in landscape.
I tinkered around with Android programming…

David Pugh
- 758
- 3
- 12
- 33
0
votes
1 answer
How can you DisplayAlert from a .NET Maui ContentView?
I am trying to do something similar to:
await DisplayAlert("Alert", "You have been alerted", "OK");
The issue is the button that is triggering this is on a ContentView, not a ContentPage. I understand why it is not available on the view (sort of),…

Cef
- 661
- 1
- 6
- 26
0
votes
0 answers
Collection View outline shows under and over my horizontal collection
I have problem with CollectionView outline. I create simple horizontal colletionView, and it is working, but on top and bottom I have gray outline.
XAML
0
votes
1 answer
How to setcontentView with subfolder
i have this layout inside a folder menu< xxx.xml
How suppose i call it in java? setContentView(R.layout.xxx.xml);(i got error)
i already trying add the path to the gradle but without success

Drakan x
- 25
- 1
- 4
0
votes
1 answer
SwiftUI ContentView_Previews not running function
I'm trying to generate some mock data for my preview in Xcode with a method written directly in ContentView_Previews but I have no success and I don't understand why.
struct ContentView_Previews: PreviewProvider {
static let healthManager =…

trusk
- 1,634
- 2
- 18
- 32
0
votes
1 answer
how can i access wkwebview from appdelegate with swiftui?
i need for the pushwoosh sdk still AppDelegate...
in the appdelegate - how can i access the webview and change the url (depending on push notifications received from appdelegate?
pushnotifications and everything works... also the initial webpage is…

zabby
- 11
- 2
0
votes
1 answer
Connecting a Label/Button from StoryBoard to ContentView in Xcode 13
Options Window
How can I connect a label, button, or other element from my Storyboard to my coding file in Xcode 13? When I first loaded Xcode, there was no storyboard file added to my project. I had to add one myself. Then, when I created labels…

Stevepit15
- 1
- 1