nsindexset Questions
6
Solved
Can you fast enumerate a NSIndexSet? if not, what's the best way to enumerate the items in the set?
Ornamented asked 17/11, 2010 at 20:50
5
Solved
I converted an NSIndexSet to an [Int] array using the answer at https://stackoverflow.com/a/28964059/6481734 I need to do essentially the opposite, turning the same kind of array back into an NSInd...
Halfassed asked 22/6, 2016 at 20:12
4
Solved
This feels like a dumb question because it seems to me like my use case must be quite common.
Say I want to represent a sparse set of indexes with an NSIndexSet (which is of course what it's for)....
Recommendation asked 28/12, 2010 at 16:21
5
Solved
I'm getting the select items from a table view with:
NSIndexSet *selectedItems = [aTableView selectedRowIndexes];
what's the best way to get the indexes in a NSArray object?
Gezira asked 22/9, 2010 at 20:7
2
Solved
In my unit testing I was looking at some boundary conditions and my tests kept failing. I tracked it back to enumerating through an index set when its indexes extend all the way to NSNotFound-1 (th...
Faceharden asked 17/5, 2014 at 15:13
3
Solved
I have a collection of int64_t values that I need to make an index set out of. I previously have used:
NSIndexSet *set = [NSIndexSet indexSetWithRange:NSMakeRange(location, length)];
to make in...
Cordiecordier asked 17/10, 2013 at 15:1
3
Solved
NSArray has useful methods to find objects for specified indexes
// To find objects by indexes
- (id)objectAtIndex:(NSUInteger)index
- (NSArray *)objectsAtIndexes:(NSIndexSet *)indexes
// To find...
Almucantar asked 25/5, 2009 at 8:9
4
In Objective-C, my program opens a window and displays a table. I want to have a specified row of the table highlighted.
How do I do this?
I seem to need the code
[myTableView selectRowIndexes:(...
Hardiman asked 19/12, 2010 at 23:35
1
Solved
I'm a bit new to Cocoa and I was reading about NSIndexSet. Why is it necessary? It seems to me that NSIndexSet is nothing but a NSSet of integers, is that right? What's the purpose of creating a se...
Cf asked 19/12, 2011 at 0:12
1
Solved
I want to select some objects from an array. Therefore I'm using begin and end indexes of my selection.
NSLog(@"start:%d\nend:%d", startIndex, endIndex);
NSIndexSet *myIndexes = [NSIndexSet index...
Overbearing asked 25/10, 2010 at 20:18
1
© 2022 - 2024 — McMap. All rights reserved.