Tagged Questions
7
votes
1answer
4k views
iOS: store two NSMutableArray in a .plist file
I want to store two NSMutableArray that I use as global array in AppDelegate. These two array are also store with NSUserDefaults. Now I want to know how I must create this file and how can I store ...
0
votes
1answer
535 views
NSMutableArray Data Attachement With E-mail Body?
My NSMutableArray data are in NSData formate.I am trying to attached NSMutableArray data to E-mail body.Here is my NSMutableArray code:
NSUserDefaults *defaults1 = [NSUserDefaults ...
4
votes
2answers
4k views
How to make an CFArrayRef to an NSMutableArray
This is my Code to create the CFArrayRef. I want to know how to make it to an NSMutableArray. I need it for my TableViewController. Or is there another way to use the CFArrayRef in the ...
6
votes
1answer
6k views
NSMutableArray stored with core data = WORKS, but after changing array DOESN'T WORK
I have a NSManagedObject with a NSMutableArray as attribute:
@interface MyObject : NSManagedObject
{
}
@property (nonatomic, retain) id a1;
In the data model it is declared as Transformable. I ...
8
votes
3answers
5k views
how can I Add a ABRecordRef to a NSMutableArray in iPhone?
I want to create an array of ABRecordRef(s) to store contacts which have a valid birthday field.
NSMutableArray* bContacts = [[NSMutableArray alloc] init];
ABAddressBookRef addressBook = ...
0
votes
4answers
102 views
Empty NSMutableArray , not sure why
Ok so I populate the array like this:
NSMutableArray *participants;
for(int i = 0; i < sizeofpm; i++){
NSDictionary *pmpart_dict = [pm_participants objectAtIndex:i];
NSString ...
2
votes
1answer
652 views
Does lastObject in NSMutableArray return a copy of the object?
I have a question related to this piece of code
NSNumber *lastObject = [self.myStack lastObject];
if(lastObject){
[self.myStack removeLastObject];
}
return [lastObject doubleValue];
I am ...
0
votes
3answers
794 views
Passing NSMutableArray from Modal View Controller to Parent View
I'm struggling to pass a NSMutable array from a Modal View controller back to the view controller I came from.
This is my current method:
FirstViewController.h
#import "SecondViewController.h"
...
0
votes
2answers
143 views
access to array object
i create an array and i initialize it with objects. i tried to get access to the array object but i get a (null). what do i do wrong?
photoArray = [[NSMutableArray alloc] init];
PhotoItem ...
0
votes
3answers
1k views
Access NSMutableArray from a different class
I have a class where a NSMutableArray object is formed, as so:
navBarColour = [[NSMutableArray alloc] initWithObjects:colourOfNavBar, nil];
I then have another class, which has the first class ...
1
vote
1answer
2k views
Mulitple Arrays From Plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
...
2
votes
5answers
811 views
NSMutableArray Difficulty
If you wanna see the code Im having problem with, here is the link:
Code
My question is connected with my past question.
I'm really having problem with my NSMutableArray, I'm currently using ...
1
vote
4answers
9k views
sorting mutable array in alphabatical order
Hi i am having a nsmutable array and in that nearly 50 -60 object having different names ,and can i sort this array in alphabatical order (Is it possible, How?) (is it a duplicate question ?)
1
vote
4answers
6k views
Adding objects in Multidimensional NSMutableArray
I'm quite confused on how to add objects in multidimensional arrays.
Is initializing multidimensional arrays are the same with just a simple array?
This is my initialization.
testList = ...
1
vote
2answers
547 views
Why does arrays handle strings containing swedish ÅÄÖ characters by using two or more indexes?
Ok, my problem is that whenever i collect data from the parser into an array where the string contains Swedish ÅÄÖ characters. In my example the
[schemaInfoArray objectAtIndex:3]
is supposed to be ...
0
votes
3answers
1k views
Searching through an array of dictionaries
I'm making an iPhone app which displays information about red wines. The wines are stored in a plist containing an array of dictionaries. I'm adding a search view controller to the application, and to ...
4
votes
3answers
2k views
Searching for a value in an unknown NSMutableArray depth
Ok, i kind of asked the wrong question so I've edited the original question.
I'm storing Arrays within Arrays, as well as NSDictionaries. It's a utility kind of application and there is no set ...
2
votes
4answers
4k views
objective c when to use NSDictionary instead of NSArray [duplicate]
I'm in a dilemma in terms of which of the two I should use. I will be retrieving a group of data via a restful API (returns json) and I'm not sure how I should store them before I display it on my UI ...
1
vote
3answers
597 views
Replace, move objects in NSMutableArray
I Have an array which I have already set the capacity to 5.
What I want to do is, when I add an object and the capacity exceeds 5 then it moves the whole array structure of objects by one. For example ...
1
vote
4answers
290 views
How can I pass a “MutableArray with full of Objects” to another class by using NSUserDefaults?
How can I pass a "MutableArray with full of Objects" to another class by using NSUserDefaults? I know how to pass "MutableArray"s but this does not work!
So;
I have a MutableArray; 'myCityObjects', ...
1
vote
1answer
117 views
How can I determine the index of an object in an NSMutableArray when I search for a NSString within it?
Currently I am coding the search capability of a UISearchBar using data from a DB that's displayed in a table. I figure out the search results and save them to NSMutableArray *searchResults. Here's ...
1
vote
1answer
227 views
NSUserDefaults and saving size
I have an app that tracks a user as they drive along. It uses CLLocationManager and each time the didUpdateToLocation is called I save the CLLocation point.
A trip of around 25 miles yields ...
1
vote
1answer
217 views
NSMutableArray index mixed up
I'm currently trying the iCarousel Multiple Carousel example.
Here in my array, I've add images with NSMutableDictionary:
I have two of these: ( myImages and myImages2 for my two slot in carousel ...
1
vote
2answers
148 views
Deleting in NSMutableArray
I have an array here, example I have 4 images on each column, each responds to its default index:
When an image is deleted for example index 1. as shown in the image below:
The index becomes ...
1
vote
1answer
217 views
How can I Attached NSMutableArray Data With E-mail Body?
I am trying to attached NSMutableArray data to E-mail body. Here is my NSMutableArray code:
NSUserDefaults *defaults1 = [NSUserDefaults standardUserDefaults];
NSString *msg1 = [defaults1 ...
1
vote
1answer
1k views
Invalid Summary on NSMutableArray
I would need some expert advice on how to solve this problem. I am doing some crude testing for a new app for the iPad.
I create a NSMutableArray (ballPath) in the viewDidLoad of my view controller ...
0
votes
3answers
685 views
NSMutableArray not saved NSUserDefault
I'm trying to save a NSMutableArray with NSUSerDefault and then open the array.
Here some code:
-(IBAction)btnSave{
Class *aClass = [[Class alloc]init];
aClass.idClass=@"aaaxxx";
...
0
votes
4answers
173 views
Unable to retrive NSMutableArray from NSUserDefaults
I have an issue persisting data in local storage for an NSMutableArray containing a list of NSStrings.
I have a save method and a get method both appear to work when the app is running. However, once ...
0
votes
1answer
128 views
Error Reading Copied NSMutableArray on iPhone SDK
In one of my methods, I fetched and parsed a JSON and placed it inside an NSArray called jsonArray in -(void)method1. I then copied the contents of that jsonArray to an NSMutableArray called ...
0
votes
3answers
703 views
UILabel in UITableViewCell to make a customised cell without making separate class
In my table view cell i need to display the contents of my array elements in a single cell and if i insert any new contents the previous contents are not to be overwritten.The previous content and my ...
0
votes
2answers
4k views
-[__NSArrayM objectAtIndex:]: index 4294967295 beyond bounds for empty array with arc4random
EDIT: i replaced arc4random() to arc4random_uniform() for fix
I'm using test flight to monitor crashes.
been fixing bugs, however i encounter this bug, i'm not sure why the index is so big.
...
0
votes
1answer
570 views
Iphone Programming XML Parser NSMutableArray
I am currently having a problem with parsing information from an XML into an NSMutableArray, i have pasted the code below which is for the parser this retrieves the document off the internet and ...
0
votes
1answer
159 views
what is the bestpractice to find the index of a mutablearray send to a sort tableview?
Sorry for that question, but what is the best practice to to find the index of a mutablearray send to a sort tableview ?
1. i create a nsmutablearray with a dictionnary
2. i create a table view with ...
0
votes
2answers
2k views
objective C: use NSMutableArray in different classes
I created two UIImageView *image1 and *image2, after I created a NSMutableArray *arrayImage, now I want fill this array
arrayImage = [[NSMutableArray alloc] initWithObjects: image1, image2, nil];
...
0
votes
2answers
2k views
NSMutable Array in other class
I declared an NSMutableArray in my .h and I set property and synthesize, but if i want use this array in other class? How I do?
0
votes
2answers
2k views
Line Graph CGPoints from NSMutableArray
I have been trying to adapt the code from the accelerometer example such that when the user depresses a uibutton a point is added to a line graph.
Working on the converting two floats, which are the ...
0
votes
4answers
2k views
Objective C: What is the best way to create and use a dynamic boolean array?
I have been struggling with the best way of creating, accessing and updating values from a dynamic boolean array for more than a week now.
@interface myDelegate : NSObject
{
NSMutableArray ...
-1
votes
4answers
167 views
NSArray clears after 3 times view did load
I have an NSArray that contains a couple of items. The NSArray is loaded into a uitableview from another class. when I back out of the detail view and re-enter (for the 3rd time), the NSArray is empty ...
-6
votes
3answers
2k views
Object cannot be nil error
I am getting an error when I try to add a new object to dataArray. This is how I define dataArray.
-(NSMutableArray *)dataArray{
if (!_dataArray){
_dataArray = [[NSMutableArray alloc] ...