Questions tagged [nsnull]

The NSNull class defines a singleton object used to represent null values in collection objects (which don’t allow nil values).

82 questions
0
votes
1 answer

Changing interface orientation from portrait to landscape causes crash

I have created a universal app that is landscape only using Xcode 7.2 (Landscape left, Landscape right and Require full screen is checked). When I run the application on the iPad simulator, it is showing portrait only. When I tried to change the…
0
votes
1 answer

iphone - [NSNull getCharacters:]:

I got the above in an error message. [NSNull getCharacters:]: I cannot find it in the documentation. Can someone explain to me what it means? Many thanks. Edit: This is a different one than the question than the one linked to which is about the…
user1904273
  • 4,562
  • 11
  • 45
  • 96
0
votes
3 answers

NSDictionary check for null

Is there a quick method for determining if a value is NSNULL in a dictionary without checking for that objects class like [[dict objectForKey:@"foo"] class] != [NSNull null];
quantumpotato
  • 9,637
  • 14
  • 70
  • 146
0
votes
2 answers

Null Value causes Realm Crashed

I am using Realm 0.92.3 but it crashed when I have null value despite I have set the default properties. Is there any solution on this? If not I might convert using coredata as this is very important to me. The null will be random on several…
shoujo_sm
  • 3,173
  • 4
  • 37
  • 60
0
votes
3 answers

iOS 8 works but iOS 7 crashes with -[NSNull length]: unrecognized selector sent to instance

I've been searching for answers for this but still haven't been able to solve how to correct the problem. This -[NSNull length]: unrecognized selector sent to instance and this [NSNull length]: unrecognized selector sent to instance 0x43fe068 did…
Storm Factory
  • 388
  • 2
  • 10
0
votes
2 answers

Parse.com - Set pointer from user Class to Installation class

Hi I have an app that I have set up with push notifications and they are working. My last step is that when a user opens the app and is asked if they want to allow push notification, I want to set a pointer from that user to the installation id…
user4048334
0
votes
2 answers

-[NSNull length]: unrecognized selector sent to instance

How to find where exactly did -[NSNull length]: unrecognized selector sent to instance happen i mean the line number.
Syed Ismail Ahamed
  • 349
  • 1
  • 6
  • 17
0
votes
2 answers

Assign NSNull Object to NSString

I'm writing an iOS App where i need to get data from a SQL-Database over mobile Services from Azure. After downloading the data I get a NSDictionary with all attributes from the SQL-Table. If an attribute is empty, the value is NSNull. Is there a…
fahu
  • 1,511
  • 4
  • 17
  • 26
0
votes
2 answers

UIWebView inside Navigation Controller crashes when typing

I've spent a few hours searching for a solution to this problem but I can't even seem to find anyone who's experienced it, let alone a solution. In my project, I have a main view controller that pushes a second view controller containing a…
deergomoo
  • 11
  • 3
0
votes
5 answers

NSMutableArray removing Nulls

From my JSON feed i create a NSMutableArray to hold my NDDictionary objects. When I come to display this in a UITableView it crashes due to Values. So I need to know, How exactly can i remove these "" Objects from my Array. Here is a…
Damien D
  • 19
  • 9
0
votes
1 answer

NSNumber numberWithInt results in NSNull when added as object to NSDictionary

This is probably a rather basic problem, but try as I might I can't find the reason that causes it. I wrote the following code: NSMutableDictionary * myDictionary = [[NSMutableDictionary alloc] init]; NSMutableArray * values =…
magnus1969
  • 137
  • 6
0
votes
0 answers

leftBarButtonItem is NULL

running into a weird issue I have a condition that checks whether a leftBarButtonItem exists and performs an action based on that. So my check is simple: if (!self.navigationItem.leftBarButtonItem) However, I am running into a situation where the…
Live2Enjoy7
  • 1,075
  • 2
  • 11
  • 22
0
votes
1 answer

Is NSNull equal to NSNull

Is [[NSNull null] isEqual:[NSNull null]] == YES? What is the proper way to test if an id is NSNull. As well, if checking two collections for equality and they both contain NSNulls, will they still be considered equal?
Name
  • 31
  • 3
0
votes
3 answers

What can I do to avoid the app crashing when it encounters a null value?

What can I do to avoid the app crashing when it encounters a null value? the error message I get is: -[NSNull isEqualToString:]: unrecognized selector sent to instance. I tried this conditional statement to check for a null value, but it still…
hanumanDev
  • 6,592
  • 11
  • 82
  • 146
0
votes
3 answers

Why cast to object before testing for NSNull?

I have the following block in a project I have been moved onto after a previous developer has left NSObject *object = (NSObject *)string; if([object isEqual:[NSNull null]]) return @"none" Where string is an NSString * returned from a…
James
  • 2,483
  • 2
  • 24
  • 31