Skip to main content

All Questions

Tagged with
-1 votes
1 answer
65 views

IBOutlet has a text value but is reporting nil every time I try to edit it - "Fatal error: Unexpectedly found nil while unwrapping an Optional value"

I've been working on a hard-coded language switcher for my app, where I have a xib file, where when I tap on a cell, it changes the language of the app, however I have a label that has the text "...
Mous772's user avatar
  • 11
0 votes
0 answers
34 views

Fatal nil Error when trying to present menu scene and create a button(swift SpriteKit)

I am trying to present a menu scene as the first scene in my game, and my menu has a play button on it, but when I run it I get a fatal nil unwrapping error. Here is some code in my gameViewController:...
Kylan O'Connor's user avatar
-2 votes
1 answer
218 views

How can I limit a text field to only intaking Double values

So essentially I'm creating a calculator type app, in which I only want to intake numbers, decimals, and the negative sign. I'm fairly new to Xcode and swift so I wouldn't consider my knowledge ...
Alex's user avatar
  • 1
-3 votes
1 answer
103 views

UI label reading as nil? [duplicate]

I'm new to Xcode and was trying to make a simple code that would unhide a label when a button is pressed. I tried using the same code in a test project with one view controller and it worked just fine,...
mushmonster's user avatar
-1 votes
1 answer
69 views

Getting error due to item found nil during unwrapping of Optional Value

I am trying to add a button that allows the user to refresh the tableview and bring them back to the top of the table. I am trying to add a snippet of code that has a var set up like this var ...
allenhinson214's user avatar
-2 votes
2 answers
49 views

Fatal error when trying to display picture from database

So I am trying to display the image that a user has selected and uploaded to Firebase Database. I have this snippet of code that displays their username, a label, and their profile image. Here is is a ...
allenhinson214's user avatar
3 votes
0 answers
70 views

Pass a string to the crash report for custom errors

I realised that if I call fatalError("It's not flying in flight mode") the crash report will strip that string leaving me with only a SIGTRAP. Is there a way to throw an error with a string for ...
Daniel's user avatar
  • 21k
-1 votes
1 answer
638 views

Fatal Error with NSLocalizedString due to one system language

I have recently started using localized Strings in my app and today I found this weird issue. For the time being, I support in my app two languages: English (the language of the project) and Italian (...
Lorenzo Santini's user avatar
0 votes
1 answer
93 views

Todo app crash error comes back with NIL? xcode

So, I have been building this project that is a todo app. and when you click on a cell your item should be searched on to ask.com. I now keep getting this fatal error. And it shows up as nil in my "...
john's user avatar
  • 23
-1 votes
1 answer
146 views

audioPlayerDidFinishPlaying func issues

I am trying to make my app so that when a user touches a UIImageView A certain sound will play. However, while that sound is playing, I want the UIImageView.isUserInteractionEnabled to be assigned to ...
Anthony Rubin's user avatar
0 votes
1 answer
115 views

Fatal error occurs when container views are added to code [duplicate]

I realize similar question about fatal errors and unwrapping optionals have been asked, but in this case the only things I have added to my code are two outlets (I've checked their connections) and ...
Ben Nalle's user avatar
  • 557
1 vote
1 answer
232 views

How to trace a fatal error with Xcode and Swift?

I am trying to test a simple a program I have made while learning swift programming, but I always get a fatal error, and nothing will be shown. I tried to copy my code to a playground, but there the ...
user avatar
-3 votes
1 answer
283 views

fatal error : (On Adding and removing a View from SuperView)

I am using https://github.com/keygx/GradientCircularProgress this cocoa pod to create Gradient Circle in my App Here is my Code. import GradientCircularProgress class MyViewController : ...
iUser's user avatar
  • 1,075
0 votes
2 answers
258 views

"Fatal error" crash at "if let"

I get a crash that has no information other than it's a fatal error. I can see it in 'Organiser' in Xcode and it points to the following line: I can't reproduce it on a device where I work or on a ...
Questioner's user avatar
  • 2,501
1 vote
1 answer
95 views

Array empty when it should clearly contain elements

I keep getting a fatal error: Index out of range error. My array should clearly contain elements from the images below but it is empty. Been Trying to debug it for hours, I am not too sure what's ...
OnlyCodeMatters's user avatar

15 30 50 per page