The GIS Guy
  • Home
  • iOS
  • Web
  • GIS

NSNull

A collection of 1 post

iOS

Objective-C 中不同类型的“空值”

以 NSDictionary 的 objectForKey 方法为例,如果字典中不存在指定的 key,返回值为 nil,如果指定的 key 存在,但是值为空,返回值则是 [NSNull null]。 There are three possible interpretations of "null" NSString: someStringPtr == nil (id)someStringPtr == [NSNull null] someStringPtr.

Jon Jon
The GIS Guy © 2025
Latest Posts Ghost