Post

Replies

Boosts

Views

Activity

Reply to Xcode simulator does not show the same as Preview
Your code will not build in Xcode, as you have not supplied the definition of "tamanosDispositivos". I think "func interfazCambio ()" should be within "tamanosDispositivos"? Your code for "func interfazCambio ()" is not valid (there is an "else if", which is not part of an "if" statement). So it is very difficult to say what might be going wrong. However, I can make some general comments: You seem to have made things very, very complicated. This does not seem to be in keeping with the principles of SwiftUI, which allow the building of a device-independent User Interface, without explicitly accounting for every variation between the different screen sizes (as you seem to do). I would suggest that you simplify your UI down to a minimal specification, and get that working first: What Views appear on screen? What are the spatial relationships between them? What conditions affect these? I would also suggest that you consider abandoning the external code library (which is just an extra complication, at this stage), and use standard SwiftUI until you have a more thorough understanding of it. (This only affects "VisualEffectBlurView", in the supplied code.) You might also want to consider some further study of SwiftUI... ...I highly recommend Paul Hegarty's Stanford course, at https://cs193p.sites.stanford.edu If you have more specific issues, I suggest you post them here on the forum, as new questions.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’21
Reply to SwiftUI NavLink Dismiss
To perform an action when a View disappears, you can use onDisappear func onDisappear(perform action: (() -> Void)? = nil) -> some View To update a value from an enclosing View, you could use a Binding.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’21
Reply to Xcode simulator does not show the same as Preview
We are getting there, but we still need: tamanosDispositivos Also, your property names (correctly) begin with a lowercase letter, but you should capitalize your struct names, so struct tarjetaMomentoDia: View { struct tarjMomentoDia: Identifiable, Hashable { struct interfazCambiante { should be: struct TarjetaMomentoDia: View { struct TarjMomentoDia: Identifiable, Hashable { struct InterfazCambiante {
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’21
Reply to Xcode simulator does not show the same as Preview
Your code samples are too messed up, to make any sense of them. Paste the code into a new answer: ...as a "Code Block" ...using "Paste and Match Style" A "Code Block" puts one line before and one line after your code, each of those two lines containing three "backtick" characters. Then your code should format nicely. Once people can read your code, they may be able to help with your problem! Properly pasted code should look nice, like this: @State var accesibilidadActivaTexto = false //Cambiar a true @State var separacioTexto: CGFloat = 0 // Separación entre texto @State var separacionTextoiPad: CGFloat = 0 // etc...
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’21
Reply to No "Create Pull Request" option in XCode 13.1
Interesting, and strange. I'm not sure what you mean by "Create Pull Request button in the branches drop-down"... I don't see that button anywhere. Where are you expecting it to be? For an Xcode project with a local repository and a remote repository, I see: Source Control > Create Pull Request... I have full access to the remote repository, could that be important? For an Xcode project with a local repository, but no remote repository, I have no option: Source Control > Create Pull Request... (It isn't greyed-out, it doesn't appear at all)
Nov ’21