Post

Replies

Boosts

Views

Activity

Reply to View Controller not visible in Identity Inspector
My guess was correct, as my answer. But visibly, once again, you are more satisfied by your own comment than the provided solution. Not sure that will help a lot for those searching a solution to a similar problem… Note: if you had read carefully and understood what the book instruction says, you would have seen it works. Maybe you should also read again how to use the forum and the correct answer mark. Have a good day.
Topic: Programming Languages SubTopic: Swift Tags:
May ’21
Reply to Update App Store Presence Without Pushing new Build
What is the issue ? Appstore does not require that there are significant changes between versions. They just ask you to tell honestly what you changed (in many cases, this is only "minor bugs correction") And there are always minor bugs to correct (could be just typos or improvements of code that are not even visible to user, like making code more robust in some places, or generating with more recent Xcode…). So my advice would be: get developers and non developers discuss the reason for change: that may give interesting ideas to developers generate a new build, even with minimal changes, with an incremented version number. That will require 10 minutes of work to development team. update the version on the store.
May ’21
Reply to Thread 1: EXC_BAD_ACCESS (code=2, address=0x16cd2fff8)
Is it the real code ? You have ForEach(elettori) but the array is not declared in this code. Where is it declared and loaded ? Can you see if it crashes before 45000 ? Could you add a print(index) during the loading of json file (there may be an error in the json itself) to see where it crashes ? If you post more code, please use the formatter tool (), to produce something like this: struct RisultatiRicercaNominativo: View { @EnvironmentObject var ricerca: Ricerca let elettore: Elettore var ricercaPrecisa :Array = [String]() var ricercaarrey = [ArrayAny]() var body: some View { VStack { navRitorno() .background(Color.blue) List { ForEach(elettori) { item in // CASO NOME PIENO E COGNOME PIENO if ricerca.nome != "" && ricerca.cognome != "" { if String(item.cognome).contains(ricerca.cognome.uppercased()) && String(item.nome).contains(ricerca.nome.uppercased()){ ElettoreSingoloView(elettore: item) .padding(.horizontal, 20) } else { EmptyView() } } //End if // CASO NOME VUOTO E COGNOME PIENO if ricerca.nome == "" && ricerca.cognome != "" { if String(item.cognome).contains(ricerca.cognome.uppercased()) { ElettoreSingoloView(elettore: item) .padding(.horizontal, 20) } else { EmptyView() } } //End if } //END LOOP } //LIST .listStyle(InsetGroupedListStyle()) Button(action: { ricerca.cognome = "" ricerca.nome = "" ricerca.sezione = "" ricerca.indirizzo = "" ricerca.isResult = false }, label: { Image(systemName: "chevron.left") .font(.title) .foregroundColor(.white) }) } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’21
Reply to Error Handling
Probably the Apple iOS App Tutorial is not for the same version than your Xcode. Which version of Xcode do you use ? Which tutorial is it, which version ? Could you give a few examples : the code the error you receive so that we can explain how to handle errors.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’21
Reply to Update a view from a button in another view.
Contraints are not that difficult if you proceed with some method: if possible, embed items that are logically linked into a view (to avoid having a lot of objects at first level of the overall view) set the constraints of these views to the superView or the safe area inside each of these views (let's call it view A), set constraints for objects. Start from an object (O1) at the top left for instance, set its constraints relative to viewA then set constraints of other objects for which that makes sense, relative to the "anchor" object O1. if necessary repeat with an object O2, , set its constraints relative to viewA then set constraints of other objects … Good continuation.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’21
Reply to Connecting Navigation Controller to View controller
You need to connect with a Relationship segue. Control drag from the root to the next VC and use relationship segue (root view controller) from the Navigation controller to the top VC in the navigation stack. And don't forget to do an option-clean build Folder. If that doesn't work: You said in initial post: except the Nav controller does not load the Map view when I click on the map icon, even though I have added the Map View to the View Controller. Where is this map icon ? Is it a button in a tab bar ? What is the ViewController that contains the map ? You may have to explain more precisely your set up. such as: Nav A - VC A Nav B - VC B VC B contains map button (where ? In tab bar, directly in the view ?) button segues to VC C VC C contains a mapView
Topic: Programming Languages SubTopic: Swift Tags:
May ’21
Reply to Is there a FAQ sheet to properly ask a question and display code?
If you want to post code: if short enough, use the code formatter tool () for better presentation and line numbering. Also paste as "Paste and match Style", to avoid the editor adding a lot of empty lines. if the code is longer, use text attachment (paper clip icon on the right): click icon and paste code. like this from : Apple Inc. « The Swift Programming Language (Swift 4). » Apple Books. Code sample - https://developer.apple.com/forums/content/attachment/fc4af5e0-e860-4a57-b02f-8d081645afb8
May ’21
Reply to Swift - How to Call and Show XIB/StoryBoard inside from XIB?
I see nowhere in the code you posted, before the last message where you described the solution DetailViewController().setupPodcastPlayer(link: url) nor a call to DetailViewController() How do you want someone to guess the problem is in a code you don't show. I regret you made some of us waste their time. Hope to see you in another thread Yes, but take care next time please. Have a good day.
Topic: UI Frameworks SubTopic: UIKit Tags:
May ’21