You can check if [string length] == 0
. This will check if it’s a valid but empty string (@””) as well as if it’s nil, since calling length
on nil will also return 0.
More Related Contents:
- How to change the text of a button to the data of a NSString?
- how to remove " in json string?
- Can’t set cell title’s text
- Constants in Objective-C
- Converting NSString to NSDate (and back again)
- How do I URL encode a string
- Objective-C and Swift URL encoding
- Remove HTML Tags from an NSString on the iPhone
- How do I convert an NSString value to NSData?
- String replacement in Objective-C
- Converting escaped UTF8 characters back to their original form
- Converting between NSData and base64 strings
- Objective-C 101 (retain vs assign) NSString
- How can I convert my device token (NSData) into an NSString?
- How do I get word wrap information with the new iOS 7 APIs?
- What is difference between URLWithString and fileURLWithPath of NSURL?
- Sort An Array in Objective C with Multiple Items [closed]
- Posting On facebook friends wall [closed]
- Setting a button’s target/action and passing a particular string to the action [closed]
- What is NSZombie?
- UIButton Long Press Event
- Check if a UIScrollView reached the top or bottom
- How to know Push Notification delivery status
- Center NSTextAttachment image next to single line UILabel
- Dismissing the keyboard in a UIScrollView
- iPhone SDK:How do you play video inside a view? Rather than fullscreen
- Setting scroll position in UITableView
- Expanding and collapsing UITableViewCells with DatePicker
- How to catch all iOS Push Notifications with different user actions including tap on app icon
- I want to get a quarter value in NSDateComponents class