All Questions
Tagged with objective-c array
9 questions
0
votes
2
answers
318
views
Initializing a big static array for a card-based iOS app
I have a card-based iOS app that uses a sizable static array of cards. Each card has several properties, mostly strings, numbers and boolean.
The first version of this app had 3-4 properties. The ...
6
votes
3
answers
2k
views
Bubble Sort in Objective-C
Following is Objective-C method implementation I did for one of the most simplest sorting algorithms, Bubble Sort to sort an array of integers.
Note:- I have defined it as a static method in the ...
1
vote
4
answers
3k
views
My own method for sorting numbers in array
I've written some method for sorting asc and desc numbers in array. All I want to know is this good logic, and is there a space for improving this code?
...
6
votes
2
answers
304
views
Array from file
I have this code which is performed each time I click the 'show polygons' button. The problem is that it takes a few seconds to finish running through the code before actually drawing the polygons + ...
6
votes
2
answers
18k
views
Splitting an NSArray into an NSDictionary of array more elegantly
I need to split one NSArray into NSDictionary. Every key in NSDictionary will contain an <...
6
votes
1
answer
3k
views
Concurrently enumerating an array using blocks in a thread-safe way
I have an array that I want to enumerate using blocks concurrently. However, I'm having trouble making this thread safe. I am new to using blocks and locks, so I am hoping someone may be able to push ...
2
votes
2
answers
1k
views
NSArray and NSNumber-int conversions
I have a textView which is displaying a string. I also have an array which keeps track of where every line begins, it stores the "start index" or NSRange.location for every line.
However, when text ...
1
vote
1
answer
273
views
Optimize nested enumerate blocks?
I have 3 nested NSEnumeration loops, which are used to get the textfields of a custom cell, in a custom table in a custom view in a controller.
How can I make this ...
1
vote
1
answer
3k
views
Function to create an array of images
I guess I made the mistake of creating UIImage *image1 to UIImage *image11. Can an one advise me on how to improve it?
...