Categories
Mastering Development

How to call a value from a different ViewContoller? (Swift)

Iv created a quiz app, that tracks the user’s score till the user gets to the end. There is an if statement – when it reaches the end of the quiz, a results View controller pops up. My Question is I want to get the same score value presented at the end on the resultsViewContoller. […]

Categories
Mastering Development

JSON codable error while using in Table View

I’m building a news app using newsapi.org api. I was able to get data from server and decode it using JSON decoder but the problem is in the response I get an array of article when I assign the array of articles as data source to table view by providing number of rows in section […]

Categories
Development

How to pass firebase data information to another viewcontroller when mapview annotation is clicked?

I know similar questions have been asked many times before. Just can’t find one solution that fits my need. Please help I have been trying to load information from firebase onto mapview. I am able to append all the information view map annotationviews. however what I want to do is pass the firebase data to […]

Categories
Development

How to setup tableview datasource numberOfRowsInSection based on fixed section titles

I can’t figure out how to setup my datasource correctly to ensure my tableview knows the correct numberOfRowsInSection based on an array I built for titleForHeaderInSection that prefixes the section order Array for Section Titles (stored in a Constants file) public static var eventFeedSectionsTitles = [“live”, “completed”, “active” ] Grouping event data into sections var […]

Categories
Development

how can i fix the error “Thread 1: signal SIGABRT”?

I have created a ViewController with a view and a button. I have declared the button as an outlet and as an Action in the viewcontroller. Additionally i am passing the data of the first Viewcontroller to the second Viewcontroller with a segue. When i click the cancel button wich executes a segue back to […]

Categories
Development Swift

How to get the post cell documentId in swift iOS Firestore?

Below is the code I am working on, there are tableview and tablecells for the list of the comments, How Do I get the document id of the cell from firestore when I click on the button in the cell. It is not showing error, but it is not performing as required, basically upon click […]