Top "Nsrange" questions

A structure used to describe a portion of a series—such as characters in a string or objects in an NSArray object.

How to capture last 4 characters from NSString

I am accepting an NSString of random size from a UITextField and passing it over to a method that I …

ios iphone swift nsstring nsrange
Problem with NSRange

I'm having a problem with NSRange. Here is my code: NSRange range = [[[NSHTTPCookie requestHeaderFieldsWithCookies:[[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:[NSURL URLWithString:cookie]]] …

iphone nsrange nshttpcookie
NSRange: range.location != NSNotFound vs. range.length > 0

I'm going through some older code in one of my apps and fixing up the code in areas that could …

ios objective-c nsstring nsrange
How can I use NSRange with integers to simplify my code?

I've just started learning Objective-C and made a little compass app that will display a direction when it falls into …

ios objective-c nsrange
NSMutableRLEArray objectAtIndex:effectiveRange:: Out of bounds

I try to assign attributes to 3 last chars of newClock string, which is @"3:33:23". However I get an error when construct …

objective-c ios7 nsrange nsrangeexception
How do I store an NSRange in a NSMutableArray or other container?

Here's what I want to do: NSRange r = NSMakeRange(0,5); id a = [NSMutableArray a]; [a addObject: r]; // but NSRange is not …

iphone cocoa cocoa-touch nsobject nsrange
How to get all NSRange of a particular character in a NSString?

I have two NSStrings: orgText and searchLetter. I want to highlight every occurrences of the searchLetter in the orgText with …

ios objective-c nsstring nsrange
Cannot convert value of type 'NSRange' (aka '_NSRange') to expected argument type 'Range<Index>' (aka 'Range<String.CharacterView.Index>')

I Have a error in my code like "Cannot convert value of type 'NSRange' (aka '_NSRange') to expected argument …

swift nsrange
Add attributes to NSMutableAttributedString character by character

Here's my situation: I have an NSMutableAttributedString with no attributes in a text view. Whenever the user presses the backspace …

ios nsattributedstring nsrange
String, substring, Range, NSRange in Swift 4

I am using the following code to get a String substring from an NSRange: func substring(with nsrange: NSRange) -&…

string range nsrange swift4