what does -arrayWithArray actually DO?
I want to see EXACTLY how it creates an array. How can I view the .m files that show how it's done? ...
I want to see EXACTLY how it creates an array. How can I view the .m files that show how it's done? ...
How can I convert an NSArray to an NSDictionary, using an int field of the array's objects as key for the NSDictionary? ...
I have a method that receives many different kinds of objects and decides what to do with them: -(void)performAction:(NSObject *)myAction withItem:(Item *)myItem { actionCount = -1; NSLog(@"-- NEW ACTION ARRAY --"); if ([myAction isMemberOfClass:[Look class]]) { currentActionArray = [self createLookArray:(Look *)myAction item:myItem];...
I have an NSArray formed with objects of a custom class. The class has 3 (city, state, zip) string properties. I would like to get all unique state values from the array. I did read through the NSPredicate class but couldn't make much of how to use it in this case. The only examples I could find were for string operations. Can someone ...
I am new to objective-C and I'm having a lot of trouble trying to add new rows to a table. The way it is suppose to work is, when the app loads an alert pops up asking the user if they would like to, start a new configuration, load a saved configuration, or resume the last configuration. Now if they select start a new configuration, th...
Hi, I use coredata to fill an array with data that is displayed in a tableview. In the tableview, I have two section. When a cell is pushed in section1, I want that cell to be moved to section2, and the other way around. Im not quite sure how to accomplish this, and I been sitting trying to figure it out for about 8 hours now. Th...
Hi guys, I have been scratching my head trying to find any resources on substringing an email address I get from a textfield into getting the first part before the @ symbol. Ive tried looking at the documentation, playing around with the componentsseparatedbyString. No luck. Thanks for your help in advance ...
hello, this is a part of my code. My application crashes when i try to load the view including the uitableview. i think there's a problem with the table i'm tryin to use but can't find it. help please gameTimingTable=[NSArray arrayWithObjects:@"2min + 10sec/coup",@"1min + 15sec/coup",@"5min",nil]; declared in .h as NSArray *game...
I have a method with the following code: NSMutableArray *pickerArray = [[NSMutableArray alloc] init]; int i; for(i = 1; i <= 7; i++) { NSString *myString = [NSString stringWithFormat:@"%@", i]; [pickerArray addObject:myString]; } for(i = 1; i <= 7; i++) { NSString *fieldName = [[NSString alloc] initWith...
I choose index of an array from a plist. It's a dictionary with 10 different line with string. NSArray* tableau = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"codes" ofType:@"plist"]]; NSDictionary* phrase = [tableau objectAtIndex:nombreChoisi]; I would like to take 6 elements and put them in 6 labels...
Hi, I need to pick string valur from an NSMutableArray then save it into a plist. I've builded an NSMutableArray to display infos in table View. Maximum allowed index is 8. (paste just two in example) The problem if the String doesn't exist, I get the following error: sDict is a dictionary for saving datas to a property list file. th...
Hello to everyone, I cannot understanding why values assign to array objects become "disordered" after executing executeFetchRequest. Well, I'm not certain that fetching is the problem here. Here's the code. objects=[NSArray arrayWithObjects:@"a",@"b",@"c",@"d",@"e",nil]; NSManagedObject *DB = nil; for (int i=0;i<[objects count];i+...
UIAlertSheet's constructor takes an otherButtonTitles parameter as a varg list. I'd like to specify the other button titles from an NSArray instead. Is this possible? i.e. I have to do this: id alert = [[UIActionSheet alloc] initWithTitle: titleString delegate: self ca...
I have an NSArray of Foos in an Objective-C program. I would like to call the doIt function of each Foo, however, the makeObjectsPerformSelector function of NSArray does not allow the original Foos to be modified, per the docs. The doIt selector changes the m data member for each Foo when doIt is called. How do I go about efficiently per...
I have an array of objects in a tableView. I want the user to be able to go to another page and select from a checklist of objects to filter the first array. How should I handle the data from the checklist? I am currently handling it as an NSMutableArray of selected objects. But then how do I filter the first array with the contents of ...
I am geting an exception while hitting the line "self.myData = ..." GDB Program received signal: EXC_BAD_ACCESS Here's my code: - (void)viewDidLoad { [super viewDidLoad]; self.myData = [NSArray arrayWithObjects: [NSArray arrayWithObjects: @"Boroughs", [NSArray arrayWithObjects: @"Kings...
In a Tabbar app, I have a TableView to show all names of each dictionary of an array coming from an array like this : <array> <dict> <key>Name</key> <string>Name1</string> <key>CategoryA</key> <string>CategoryA1</string> <key>CategoryB</key> <string>CategoryB4</string> <key>CategoryC</key> <string>CategoryC8</string> </dict> <di...
Suppose I have following data in my game. I have developed game in cocos2d. Name Score Sagar 10000 Amit 2000 Vishal 90 Above data is stored in plist file. Plist has an array as root. Within that there are 10 dictionary. Each dictionary has two values. String values - Name Number value - score When I use NSMutableArray...
I can't believe I forgot this, what is in an NSArray if there's no value in the field (this is being determined by loading a .plist file). I know I should know this, but right now I'm having a serious brain fart ...
Is there anyway I can look at the size of a file the application creates in bytes then store that number to use later? OR is there any way I can tell if an object in an NSArray is empty, I've tried everything, but it just doesn't work! ...