Tagged Questions
1
vote
3answers
110 views
NSMutableArray Display Null Value in Table View
- (void)viewDidLoad {
self.detailView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 320, 480) style:UITableViewStylePlain];
self.detailView.dataSource = self;
self.detailView.delegate = ...
1
vote
0answers
91 views
Memory leak in [[NSMutableArray alloc] init] even though with ARC
I am working heavily on Memory Fineturning and most of the problems are solved with the help of stackoverflow. But finally I got struck with a serious memory leak with NSMutableArray initialization.
...
2
votes
1answer
142 views
Sort JSON objects
I have 3 MutableArray's, but only want to use one of them, to sort all of them in the tableView.
jsonArray = [[NSMutableArray alloc] init]; //NAME
jsonStations = [[NSMutableArray alloc] init]; //URL
...
1
vote
1answer
43 views
ios - don't understand how to properly work with arrays when dynamically populating lists
I am trying to figure out how to create a list of strings that populates a UITableView and makes sure that each cell has proper size to fit each string (some of the strings can get quite long)
What I ...
5
votes
1answer
94 views
IOS 5: How to return YES on contains: with 2 'identical' objects, but with different pointers
I'm quite new to StackOverflow, so apologies in advance if I forgot some
critical element in my question. It's a long one, so bear with me!
Iterating over JSON-webservice result:
For an IOS5 iPad ...
0
votes
1answer
92 views
NSMutableArray objectatindex always shows the last Object
my problem is that my NSMutableArray always get the last element with the objectatindex-method.
I have an array with some classes derived from UIViewController. I want to show one View after another. ...
0
votes
1answer
257 views
How to copy custom NSObject into NSMutableArray
NSDictionary* json = [NSJSONSerialization
JSONObjectWithData:responseData
options:kNilOptions
error:&error];
NSArray* users = ...
0
votes
1answer
128 views
NSMutableArray is printing only the last element and not whole datas in the array
Can anyone please help me out.I have been stuck with this NSMutableArray for last 2-3 days. I am beginner in Objective-C and I don't know what is the error in the code.In my program, I have created a ...
1
vote
1answer
127 views
how to access NSMutablearray in another UIViewcontroller?
I have a NSMutable array defined in NSObject class like this
NSMutableArray *allbilltypeArray=[[NSMutableArray alloc] initWithArray:[sqlite executeQuery:@"SELECT * FROM dir_AddBillName"]];
Now I ...
0
votes
1answer
53 views
Pick out certain part of NSMutableAray
How would I pick out certain part of NSMutableArray?
One fielding array from server is 2012-09-01 09:00:00 America/Los_Angeles
I am trying to get just the time.
I was thinking turning it into a ...
0
votes
1answer
71 views
TableViewCells and Array of Dictionaries
I am having trouble understanding how to populate my table with all the dates. returns only the day 9-1-2012 not 8-31-2012. I have tried a few things like using my days and slots in ...
0
votes
7answers
447 views
Getting a null value in the NSMutableArray
My program contains three textfields and I am inserting the data into an sqlite database. Now I am trying to display the data from the database in the tableview. For that I tried to add the data into ...
0
votes
2answers
490 views
iPhone- Collection <__NSArrayM: 0x1416eea0> was mutated while being enumerated
In my iphone game, when run on the ios 4.0 simulator everything works fine. However when running with the 5.0 simulator or on a 5.0+ device, the app crashes on the first level leaving an error:
...
1
vote
2answers
1k views
iOS - Make a copy of a array object into another
I have a little problem, and I need help.
I want to loop through a multidimensional array, and every time I find a value for a key ex."name" that is equal to ex. "Hello". I want to copy that array ...
1
vote
1answer
64 views
Error in using NSMutableArray
I am trying to populate an NSMutableArray here named "data" with NSArrays. When I try to retrieve I get EXC_BAD_ACCESS. Here is my code for poulating
.h
@property (nonatomic, retain) ...
0
votes
3answers
103 views
How to release an NSMutableArray?
I have an NSMutableArray with the following property:
@property (nonatomic, strong) NSMutableArray *alarmTableArray;
alarmTableArray = [[NSMutableArray alloc]init];
FMDBDatabaseAccess *db = ...
-3
votes
2answers
71 views
Class using NSMutableArray crashing? [closed]
So I am new to Objective-C but not to OOP programming. I am trying to make a class that will add "Squares" to a NSMutableArray but when I wrote the class and ran my app, it crashed. Here is the ...
0
votes
1answer
1k views
Get object index in NSMutableArray using dictionary object key in iphone sdk
i'm trying to get object index from array using dictionary key object... but unable to get it.
Here are the details..
I have the Array having dictionaries....
(
{
CATEGORYID = 865;
...
0
votes
1answer
101 views
Mutating method sent to Immutable object - Where?
Kind of stuck on this error.
Pretty basic error
2012-07-20 12:44:07.462 Picsilk[4286:17903] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[__NSCFArray ...
1
vote
3answers
185 views
Error when trying to shuffle an NSMutableArray
I'm trying to shuffle an NSMutableArray so that its order will be mixed up every-time someone loads the view.
In my -(void)viewDidLoad I'm putting the following code (as suggested by other users):
...
1
vote
1answer
27 views
Need Mutable varient
What would be the mutable varient of this line of code:
self.dsSearch = [self.ds filteredArrayUsingPredicate:resultPredicate];
Any help appreciated:)
0
votes
1answer
336 views
tableView:commitEditingStyle:forRowAtIndexPath: not working
So, in my viewDidLoad method I called:
self.navigationItem.rightBarButtonItem = self.editButtonItem;
Then later on in my tableView:commitEditingStyle:forRowAtIndexPath: I do this:
- ...
0
votes
1answer
113 views
Save a mutable array with multiple properties to a plist
I have a mutable array that has about 100 objects in it and each object has three properties.
I cannot save this to a plist?? I can save an array that just has objects without properites, but the ...
-2
votes
1answer
103 views
Getting a sigabrt error on these 2 lines of code [closed]
I'm simply creating a game and created an array of enemies (as you see below) and created a loop to make them appear but get an error once I run it and used breakpoints and it stops here
enemyArray = ...
0
votes
2answers
94 views
NSMutableArray removeAllObjects replaces contents after removal with other items
sorry if the title is worded oddly, not really sure how to say it. I am adding contents of an array of object's from a JSON into another array, so I can do use a sectioned UITableView. However, when I ...
0
votes
2answers
136 views
NSMutableArray removeAllObjects issue
I'm facing a problem with NSMutableArray that give me a Exc_Bad_Access without a reason.
I have a UITableView that contain around 700 records, i wanna to activate a filter process to it, i'm using ...
4
votes
1answer
781 views
Deep mutable seralizing iOS dictionaries / arrays
Some jSON comes from a local file that my app decomposes : {"1":{"name":"My List","list":[]}}.
I use this iOS 5.1 code to convert the entire thing into what I assume to be a deep mutable dictionary, ...
0
votes
2answers
138 views
How to access a mutable array that is a property of an instance of an Object and fill that array up with values
I have a Card Object, which have 4 instance variables namely name(NSString), pin(NSString), points(NSNumber), pointsToDeduct(NSMutableArray).
Card.h
@interface Card : NSObject
@property ...
0
votes
2answers
936 views
NSMutable Array from One Class to Another Class in iPhone
I have an NSMutable Array in FirstViewController class, I want to Pass that array to SecondViewController class. And I want to use that in SecondViewController class. I am doing this in Xcode 4.2.1 ...
0
votes
1answer
241 views
NSMUtableArray adding objects by clicking on a button
I am having problems to do show some data in a UITextView.. here´s the problem. I have a pickerview with two components: one with the products and the other one with the amount to be sold.
I also ...
-1
votes
1answer
617 views
How to compare the NSTimeInterval(NSNumber Objects) inside a NSMutableArray?
I have two NSMutableArrays(arrayContainsGoodClicks and arrayContainsBadClicks). I am initializing these Arrays with some NSTimeInterval values when the relevant Good and Bad buttons are clciked. Now ...
2
votes
3answers
597 views
How to store NSTimeInterval values into a NSMutableArray?
I have a requirement where i have a Video that is played using MPMediaPlayerController. Along with the video i have two buttons where i need to capture the current playback time when the button are ...
-1
votes
4answers
123 views
Inspect array after adding object
The compiler doesn't give me any error and the code runs. Just curious how can I check the contents of my array after adding a new element.
In my .h file
@interface AddCardViewController : ...
-1
votes
3answers
246 views
Add the contents of a UITextField to an NSMutableArray
How can I put an element coming from a UITextField into an NSMutableArray?
0
votes
2answers
187 views
How to add (coding or through storyboard) Favourite - content of cells (UITableviewcell) and UIView it self
i'm bit stumped to know how to achieve favourite option i.e. i have a lot of static cells in various views and i want user to select that cell and it adds to favourite, and idea is more like favourite ...
0
votes
2answers
220 views
Retrieving and storing data from SQLite or NSMutableArrays in an iphone application
My real Question is which of these is more efficient in terms of loading speed and cpu load for an iphone application. could you please based your answers with proofs such real results or valid ...
0
votes
1answer
481 views
xCode ios How to write a mutable array to a file on the desktop?
I have a one-time need to create a file from an iOS mutable array. The array will be a short animated drawing.
That will be input to an app.
I write the array, and redraw it in the app, so I know ...
0
votes
1answer
318 views
iOS 5.0 - Pass NSMutableArray from Helper Class to View Controller
I have a helper class designed to get data from Core Data and pass it back to a view controller. Here's the code:
View Controller:
@interface AnnouncementsController : UIViewController
@property ...
0
votes
1answer
120 views
UITableView help xcode4 [closed]
**I am trying to pass an array from one table. View to the other.
What I have done: created the table in the parent view controller with an NSMutable array.
What I would like to do: when a certain ...
0
votes
1answer
221 views
removeObjectForKey: Doesn't work in iPhone 5 simulator?
I'm a new developer, so this may be an obvious question.
When testing my code in the command-line tool I was able to use removeObjectForKey: to remove an NSMutableArray object I'd added to an ...
0
votes
1answer
331 views
How to insert a new row into NSMutableArray?
I have an NSMutableArray to has the "many" side of a one-to-many relationship. I have it loaded into a UITableView. When I edit the table, by tapping "edit" I have the ability to add a new row to ...
0
votes
1answer
897 views
iOS 5 Problems converting an NSDictionary to an NSMutableArray?
I am creating an IPOD App and I have an NSDictionary that I have created from a JSON feed. I am trying to convert this to an NSMutableArray. I know I need to loop through the dictionary and write the ...
0
votes
3answers
683 views
increment int value in an NSMUTABLEarray objective C
I got:
@interface ViewController : UIViewController
{
int index_counter;
//NSMutableArray *logins;
}
@property (weak, nonatomic) IBOutlet UITextField *count;
@property (strong, nonatomic) ...
0
votes
3answers
1k views
How to parse through an NSMutable Array and add up the values
Im having problems trying to add (sum) up all the values in a NSMutable Array: The ProfileItems contains data from a Core Data Entity, and is populated with the correct data. I'm just having ...
-1
votes
3answers
709 views
Iterate through NS array of obs
I need to take this data structure, an nsmutablearray, and iterate through each index and print each field into a textfield. every "forward" button increments the data ahead and "backwards" goes back. ...
1
vote
3answers
324 views
Loading NSMutableArray in UITableViewController with Search bar crashing - iOS5 with ARC
I'm loading a NSMutableArray into a UITableViewController with a search bar in iOS 5. If I fill the array as code below and click over the search bar, it works perfectly:
[placesOutputArray ...
0
votes
1answer
373 views
iOS5/xCode Setting up an array with a json file for use later on
I have the following code that I run at viewDidLoad:
NSString *json_list = [[NSBundle mainBundle] pathForResource:@"mylist" ofType:@"json"];
NSData *theList = [NSData dataWithContentsOfFile: ...
0
votes
2answers
2k views
Sort an NSMutableArray of custom objects Alphabetically
I have an NSMutableArray of custom objects. The custom object (Tag Class) has an two properties defined as so:
@interface Tag : NSObject
@property (strong, nonatomic) NSString *tid;
@property ...
0
votes
5answers
390 views
How can i push a TableView on clicking a button and initialize the TableViewCell with NSDictionary?
Can anyone please help me about how to push a table view on clicking a button.
I want to load the messages from NSMutableArray to the table view cells and NSMutableArray is loaded with the data ...
0
votes
1answer
214 views
What is the diffrence between `[blah addObject:@“1”];` and `[blah insertObject:@“0” atIndex:0];`?
What is the difference between:
[blah addObject:@"1"];
And
[blah insertObject:@"0" atIndex:0];
???
I know there both for a NSMutableArray.