Search Results

Search found 2980 results on 120 pages for 'xcode bots'.

Page 17/120 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Adding sections to a plist for Xcode for use in Cocoa touch Table View

    - by Steve
    I am a beginning iPhone SDK programmer. I built a simple practice application I am trying to use to learn more about table views. It's an app that loads football teams from a plist and displays them in a table view with their stadium name and logo. Tapping the team goes to a detail view for that team. I am trying to understand how to add sections to this, so that I might have a couple of teams in one section and others in another section, etc. I would assume I need to both re-structure my plist and change the code to read arrays from the different levels of the plist? To begin, I had a plist with the root array consisting of 3 dictionaries, one for each team. Each dictionary had 3 keys, "name" "stadium" and "logo". This works fine. I am loading it via: NSString *path = [[NSBundle mainBundle] pathForResource:@"teams" ofType:@"plist"]; teams = [[NSMutableArray alloc] initWithContentsOfFile:path]; and then // Configure the cell. NSDictionary *team = [teams objectAtIndex:indexPath.row]; cell.textLabel.text = [team objectForKey:@"name"]; NSString *imgPath = [team valueForKey:@"logo"]; cell.imageView.image = [UIImage imageNamed:imgPath]; cell.detailTextLabel.text =[team objectForKey:@"stadium"]; return cell; No problem. But now I wanted the sections, so I changed my plist to: <array> <dict> <key>teams 1</key> <array> <dict> <key>name</key> <string>Packers</string> <key>stadium</key> <string>Lambeau Field</string> <key>logo</key> <string>packers.jpg</string> </dict> <dict> <key>name</key> <string>Jets</string> <key>stadium</key> <string>Giants Stadium</string> <key>logo</key> <string>jets_logo.jpg</string> </dict> </array> </dict> <dict> <key>teams 2</key> <array> <dict> <key>name</key> <string>Cincinnati Bengals</string> <key>stadium</key> <string>Paul Brown Stadium</string> <key>logo</key> <string>bengals.jpg</string> </dict> </array> </dict> And I am unsure how to modify the viewDidLoad to assign the sections to one NSArray and the teams "level" to another array.

    Read the article

  • Problems using xcode in debug mode with Core Plot

    - by Splash6
    I'm having a problem compiling an application which uses Core-Plot in debug mode. It works absolutely fine compiling in release mode, but when I compile in debug mode I get an error that the header file for Core-Plot can't be found. Any idea which of the many settings in x-cide might be causing this problem?

    Read the article

  • Where does Xcode Organizer store iPhone screenshots?

    - by Anton
    I've made a hundred of screenshots from iPhone thru Organizer but it looks like the only way to get actual files is by clicking on each screenshot and saving it. Is there any place on my Mac I can have them all? They are definitely stored somewhere -- all are listed in OrganizerScreenshots.

    Read the article

  • touchesBegin & touchesMove Xcode Obj C Question

    - by AndrewDK
    So I have my app working good when you press and drag along. I also have UIButtons set to Touch Down in Interface Builder. As well when you drag you need to drag from the outside of the UIButton. You cannot click on the UIButton and drag to the other. TOUCHES MOVED: Code: -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [[event touchesForView:self.view] anyObject]; CGPoint location = [touch locationInView:touch.view]; if(CGRectContainsPoint(oneButton.frame, location)) { if (!oneButton.isHighlighted){ [self oneFunction]; [oneButton setHighlighted:YES]; } }else { [oneButton setHighlighted:NO]; } // if(CGRectContainsPoint(twoButton.frame, location)) { if (!twoButton.isHighlighted){ [self twoFunction]; [twoButton setHighlighted:YES]; } }else { [twoButton setHighlighted:NO]; } } TOUCHES BEGAN: Code: - (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [[event touchesForView:self.view] anyObject]; CGPoint location = [touch locationInView:touch.view]; if(CGRectContainsPoint(oneButton.frame, location)) { [self oneFunction]; [oneButton setHighlighted:YES]; } if(CGRectContainsPoint(twoButton.frame, location)) { [self twoFunction]; [twoButton setHighlighted:YES]; } } I want to be able to click on any of the button fire the function & also be able to drag from one button on to the other and fire that function. So basically just being able to click on a button and slide your finger over and activate the other button without having to press and slide from outside of the button. I think I'm close, need a bit of help. Hope thats clear enough. Thanks.

    Read the article

  • XCode code generation

    - by Ali Shafai
    I was wondering if there is a tool (automator script or a third party) to generate code for simple scenarios like add another property. I don't like going to two or three places and write the same thing over and over again. instead I want to say "I want a new property of type int with name X" and it generates the lines in .h and .m files for me in one go.

    Read the article

  • Xcode: gcc-4.2 failed with exit code 1

    - by genesys
    Hi! I'm working on a game for the iPhone where I use the Oolong engine for rendering, and now I just tried to update my project to the newest version. However - now I get the following error when I try to compile: gcc-4.2 failed with exit code 1 in the build results I see in which cpp file the error happens, but I don't see any additional information. how can I get more info about what is going wrong in order to track down the problem? edit: after inspecting the compile output, i got the following lines, where the error occurs: {standard input}:61:selected processor does not support 'fmrx r0, fpscr' {standard input}:62:unshifted register required -- 'bic r0,r0,#0x00370000' ...somemorelines {standard input}:69:selected processor does not support 'fmxr fpscr,r0' this is some VFO code from one of the #include files. it works fine in the examples that come with the egnine. could there be something screwed up with my project settings? I compared them to the one of the example and they seem to be identical

    Read the article

  • collect2: ld returned 1 exit status error in Xcode

    - by user573949
    Hello, Im getting the error Command /Developer/usr/bin/gcc-4.2 failed with exit code 1 and when the full log is opened, the error is more accurately listed as: collect2: ld returned 1 exit status from this simple Cocoa script: #import "Controller.h" @implementation Controller int skillcheck (int level, int modifer, int difficulty) { if (level + modifer >= difficulty) { return 1; } if (level + modifer <= difficulty) { return 0; } } int main () { skillcheck(10, 2, 10); } @end the .h file is this: // // Controller.h // // Created by Duo Oratar on 15/01/2011. // Copyright 2011 __MyCompanyName__. All rights reserved. // #import <Cocoa/Cocoa.h> @interface Controller : NSObject { int skillcheck; int contestcheck; } @end and no line was specified that the error came from, does anyone know what the source of this error is, and more importantly, how to fix it? EDIT: I removed the class so now I have this: // // Controller.m // // Created by Duo Oratar on 15/01/2011. // Copyright 2011 __MyCompanyName__. All rights reserved. // #import "Controller.h" int skillcheck (int level, int modifer, int difficulty) { if (level + modifer >= difficulty) { return 1; } if (level + modifer <= difficulty) { return 0; } } int main () { skillcheck(10, 2, 10); } and for the .h file: // // Controller.h // // Created by Duo Oratar on 15/01/2011. // Copyright 2011 __MyCompanyName__. All rights reserved. // #import <Cocoa/Cocoa.h> and the log says: (thanks to the guy who said how to open it) Ld build/Debug/Calculator.app/Contents/MacOS/Calculator normal x86_64 cd /Users/kids/Desktop/Calculator setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/gcc-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/kids/Desktop/Calculator/build/Debug -F/Users/kids/Desktop/Calculator/build/Debug -filelist /Users/kids/Desktop/Calculator/build/Calculator.build/Debug/Calculator.build/Objects-normal/x86_64/Calculator.LinkFileList -mmacosx-version-min=10.6 -framework Cocoa -o /Users/kids/Desktop/Calculator/build/Debug/Calculator.app/Contents/MacOS/Calculator ld: duplicate symbol _main in /Users/kids/Desktop/Calculator/build/Calculator.build/Debug/Calculator.build/Objects-normal/x86_64/Controller.o and /Users/kids/Desktop/Calculator/build/Calculator.build/Debug/Calculator.build/Objects-normal/x86_64/main.o collect2: ld returned 1 exit status Command /Developer/usr/bin/gcc-4.2 failed with exit code 1 ld: duplicate symbol _main in /Users/kids/Desktop/Calculator/build/Calculator.build/Debug/Calculator.build/Objects-normal/x86_64/Controller.o and /Users/kids/Desktop/Calculator/build/Calculator.build/Debug/Calculator.build/Objects-normal/x86_64/main.o Command /Developer/usr/bin/gcc-4.2 failed with exit code 1

    Read the article

  • Defining a Class in Objective C, XCode

    - by Brett
    Hello; I am new to Objective C, and am trying to write a class that defines a complex number. The code seems fine but when I print to the console, my values for instance variables are 0. Here is the code: // // ComplexNumber.h // Mandelbrot Set // // Created by Brett on 10-06-02. // Copyright 2010 __MyCompanyName__. All rights reserved. // #import <Foundation/Foundation.h> #import <stdio.h> @interface ComplexNumber : NSObject { double real; double imaginary; } // Getters -(double) real; -(double) imaginary; // Setters -(void)setReal: (double) a andImaginary: (double) b; //Function -(ComplexNumber *)squared; @end // // ComplexNumber.m // Mandelbrot Set // // Created by Brett on 10-06-02. // Copyright 2010 __MyCompanyName__. All rights reserved. // #import "ComplexNumber.h" #import <math.h> #import <stdio.h> @implementation ComplexNumber -(double)real{ return self->real; } -(double)imaginary{ return self->imaginary; } -(void)setReal: (double) a andImaginary: (double) b{ self->real=a; self->imaginary=b; } -(ComplexNumber *)squared{ double a = pow(real,2); double b = pow(imaginary, 2); double c = 2*real*imaginary; ComplexNumber *d; [d setReal:(a-b) andImaginary: c]; return d; } @end In the App Delegate for debugging purposes I added: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { ComplexNumber *testNumber = [[ComplexNumber alloc] init]; [testNumber setReal:55.0 andImaginary:30.0]; NSLog(@"%d", testNumber.real); // Override point for customization after app launch [window addSubview:viewController.view]; [window makeKeyAndVisible]; return YES; } But the console returns 0 everytime. Help?

    Read the article

  • Why is XCode Organizer console sometimes empty when I connect my iPhone

    - by toofah
    When testing my iPhone app I have found it incredibly useful to log information to the console window. I think it is amazing that I can send out an adhoc build to my co-workers and if they experience problems I am able to plug their iPhone into my mac and grab their console output. However, sometimes the console window is blank when we do this. Why is this the case? The code has been built with logging enabled. Besides that, it seems that the console output, when I see it, contains information about not only my app, but other iphone system logging. Thanks for any insight you can provide.

    Read the article

  • What does get-task-allow do in Xcode?

    - by Mr. Matt
    So when I set up my entitlements in my iPhone app project, I create a new Entitlements.plist, and set the value of get-task-allow to false. But why? What does this key represent? EDIT Note this is related to this question - I found that flipping the value of this key to true allowed me to install the app on my device)

    Read the article

  • XCode missing inline test results

    - by Vegar
    Everywhere there are pretty pictures of failing tests shown inline in the code editor, like in Peepcodes Objective-C for Rubyist screencast and in apples own technical documentation: When I build my test-target, all I get is a little red icon down in the right corner, stating something went wrong. When clicking on it, I get the Build Results, where I can start to hunt for test results. Do anyone have a clue on what´s wrong?

    Read the article

  • How do I find out what objects points to another object i Xcode Instruments

    - by Arlaharen
    I am trying to analyze some code of mine, looking for memory leaks. My problem is that some of my objects are leaking (at least as far as I can see), but the Leaks tool doesn't detect the leaks. My guess is that some iPhone OS object still holds pointers to my leaked objects. The objects I am talking about are subclasses of UIViewController that I use like this: MyController *controller = [[MyController alloc] initWithNibName:@"MyController" bundle:nil]; [self.navigationController pushViewController:controller animated:YES]; When these objects are no longer needed I do: [self.navigationController popViewControllerAnimated:YES]; Without a [controller release] call right now. Now when I look at what objects that gets created I see a lot of MyController instances that never gets destroyed. To me these are memory leaks, but to the Leaks tool they are not. Can someone here tell me if there is some way Instruments can tell me what objects are pointing to my MyController instances and thereby making them not count as memory leaks?

    Read the article

  • getting error when using mapkit in xcode?

    - by Rahul Vyas
    'NSInvalidUnarchiveOperationException', reason: '*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (MKMapView)' i am getting this error.am i missed something.i don't know from where to add MApkit.framework first i tried with target-getInfo and then from the bottom + sign added framework but that did not wrked.then i search in spotlight and added another framework.by adding this it removed previous error but gives the above one.what is the exact location of mapkit framework. i want to test it in simulator.

    Read the article

  • Searching in Xcode not finding results (searching my source)

    - by brs
    I'm pulling my hair out on this and Google results are skewed since it thinks I want to find out how to code something. My problem is that when trying to search my code with the String Matching box it finds nothing, even if I enter something that is on the screen below. Is it Spotlight that is delivering these results? I'm not excluding anything in my Spotlight index so should I just rebuild the index? Thanks for any help you can offer.

    Read the article

  • twitter oauth in xcode 3.2

    - by Oscar Navidad
    hello i make a app for the ipad in objective-c about twitter with ouath autenthication , you can help me , how find a tutorail and documentacion about this ? . i try with oauth/code but the guide the this page no is clear thans in advance

    Read the article

  • xcode may not respond to warning

    - by Frames84
    Hi all, Can't seem to get rid of a warning. The warning is: 'UIImage' may not respond to '-scaleToSize' above the @implmentation MyViewController I have this @implementation: @implementation UIImage (scale) -(UIImage*)scaleToSize:(CGSize)size { UIGraphicsBeginImageContext(size); [self drawInRect:CGRectMake(0, 0, size.width, size.height)]; UIImage* scaledImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return scaledImage; } @end Then I have MyViewController implementation @implementation TodayNewsTableViewController @synthesize dataList; ...... - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *MainNewsCellIdentifier = @"MainNewsCellIdentifier"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier: MainNewsCellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier: MainNewsCellIdentifier] autorelease]; } NSUInteger row = [indexPath row]; NSDictionary *stream = (NSDictionary *) [dataList objectAtIndex:row]; NSString *title = [stream valueForKey:@"title"]; if( ! [title isKindOfClass:[NSString class]] ) { cell.textLabel.text = @""; } else { cell.textLabel.text = title; } cell.textLabel.numberOfLines = 2; cell.textLabel.font =[UIFont systemFontOfSize:10]; cell.detailTextLabel.numberOfLines = 1; cell.detailTextLabel.font= [UIFont systemFontOfSize:8]; cell.detailTextLabel.text = [stream valueForKey:@"created"]; NSString *i = [NSString stringWithFormat:@"http://www.mywebsite.co.uk/images/%@", [stream valueForKey:@"image"]]; NSData *imageURL = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:i]]; UIImage *newsImage = [[UIImage alloc] initWithData:imageURL] ; UIImage *scaledImage = [newsImage scaleToSize:CGSizeMake(50.0f, 50.0f)]; // warning is appearing here. cell.imageView.image = scaledImage; [imageURL release]; [newsImage release]; return cell; } Thanks for your time in advance. Frames

    Read the article

  • xcode provision error

    - by eda
    i installed and setup all the certificates, provisions , etc. and selected the did what was needed in the project edit page. i have the device in the usb and once i build i get this error. The iPhone “myname” doesn’t have the provisioning profile with which the application was signed. i have tried everything, read tutorials and what i can to get this to work. what are some things i can try that you have? tahnks

    Read the article

  • IPhone XCode programming: view called from a navigation view doesn't set its IBOutlet attributes

    - by Antonio Murgia
    I created a view Called ProgrammaView that appears when a row of a table is clicked. This view has a UILabel, a UIImageView and a UITextView. Now. ProgrammaView's Outlets have to be changed by the parameter passed to a method of the view called iniz. in this image there is first the ProgrammaView.h and then the method iniz. The problem is that the label and other stuff doesn't change! I checked 3 million times that everything between the xib file and the controller is linked. The trick to call iniz in the other viewcontrollers works well in other part of the program so i think is not that the problem. Thank you in advance!

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >