xcode

Can´t pass a NSString from one view to an other view

Hello, I try to pass a NSString from one view to an other view, but I doesn't work. I set a NSString in the SecondViewController as property @property (assign) NSString * wert1; When I load the SecondViewController with a button-press on the FirstViewController, I try to pass the NSString: SecondViewController *Second = [[SpinViewCon...

Animating "sliding" in NSOutlineView

I've done a fair amount of Googling, but still haven't find any proper solution for animating the expansion of NSOutlineView. I'm trying to mimic a "sliding" animation when expanding/collapsing rows. Anyone know a good strategy for attempting this? Animating this: }} Folder 1 To expand and look like this: }} Folder 1 }}}}} Item 1 ...

how programatically insert data into mysql from iphone

hi, i try to insert data into mysql table in server using php server scripting, its working fine, is it any possibilites to insert data into mysql table without calling the php server scripting, thanks ...

What is the Max length of a resource name?

In my XCode project, I added a Sounds folder to my Resources folder. Into the Sounds folder, I dropped a couple of MP3 files with fairly long names (25-30 chars). I like to be descriptive. However, the following code chokes with an UNCAUGHT EXCEPTION: fileURL = [[NSURL alloc] initFileURLWithPath:[mainBundle pathForResource:@"really_r...

Interface Items in ChangeViewController.xib do not show up when run

I add items in Interface Builder to the XIB but then when I run it in the iPhone Simulator, I just get a gray screen. Then for some reason, if I go to the Interface Builder, draw "View" and then paste my items inside it, the items suddenly work fine. ...

What does Out Of Scope mean?

Hello, I have received an error that indicates that "savedNumberDict" is Out Of Scope. I am not quite sure where to look for a solution. Any suggestions? The code is below that I am using. Thanks. - (void)applicationDidFinishLaunching:(UIApplication*) application { self.savedNumber = [[NSUserDefaults standardUserDefaults]objectFor...

How can I simulate the same Window layout as Finder?

How can I make a window with same basic structure as the Finder window (a menu/source list to the left with icons that can be organized, and the content in a larger view on the right)? ...

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

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...

Can't set a custom backgroundColor with an if-query in applicationDidFinishLaunching

Hello, my program normally has a standard background: "black.jpg". In the applicationDidFinishLaunching I did the following: [window addSubview:viewController.view]; [window makeKeyAndVisible]; viewController.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"black.jpg"]]; and I have a nice black back...

Fill in a box on page within WebView from XCode

Hello This is an interesting one for you all! I am looking at doing an app which contains a webview that points to a website that requires a login. I know how to do the webview, etc but is there a way that I can automatically fill in the usernanme and password through XCode? I am looking at storing the user name and password within ...

How do I compare 2 integers without getting warnings?

Hello I have a variable Player1Visits which is declared as int If I try to compare this to 1 using Player1Visits == 1 I get the warning comparison between integer and pointer. Should I be using a different type? Paul ...

Xcode SVN can't add JSON directory to repository

I have added the JSON-framework (Stig B - Google code) to my Classes folder (just the JSON directory as per option 1 instructions). I had subversion set up which was working fine, until i added this directory. If I modify any existing files that were in the repository, they get marked as M and i can commit those, but i cannot commit th...

Making good use of XCode performace tools

What are the best practices, tricks, and tutorials for using XCode's performance tools, such as the Leak Monitor and the CPU sampler, for someone trying to debug and enhance performance of an iPhone application? Thanks! ...

How can I skip compressing one PNG?

(Note: I have solved this problem, but it took long enough that I'm posting question/answer here.) The Xcode build process "optimizes" my PNGs when building. This isn't usually a problem, but iTunesArtwork being processed in this way causes corrupts it so that iTunes not to be able to show it. How can I prevent this? ...

Unknown problem in my code - Console says: unrecognized selector sent to instance - I try to use the MGTwitterEngine

Hi, since yesterday I've got a bug in my application and I don't get where it is. Actually I am pretty sure that I did not change anything and that it worked perfectly yesterday. I do not intent to publish all of the code but I can post my first ViewController, if you want. The problem occurs in both ViewControllers. I use the MGTwitt...

GLUI problem when using cocos2d OpenGL

Has anyone come across this problem when building with cocos2d (OpenGL library for iPhone 2D games)? "glui/GL/glui.h" file is not found gluOrtho2D was not declared GL_COLOR_BUFFER_BIT was not declared. There seems to be very little info on GLUI for iPhone on the web. I am new to OpenGL, so appreciate the help! I have included Open...

iphone project constant

Hello, I want to have a constant in my project to change between Lite and Pro version. I don't think it is the best way to do it, but I am trying to: add a constant in my app delegate #define BUILD_PRO 1 //0 => LITE, 1 => PRO when I need it I import the appDelegate and test it: #import "myAppDelegate.h" then later #if (BUILD_PRO...

Can't build app for iPhone simulator

I'm unable to build a very simple program when building for the iPhone simulator. It compiles fine for the device however! An example code that the compiler doesn't like: @protocol Invokable - (id) invoke: (id)arg with:(id)data; @end @interface Worker : NSThread { NSAutoreleasePool* memoryPool; } - (void) invoke:(id)target select...

Help with opening a file in C on Xcode

I'm trying to open a simple .rtf file called test in C. I'm using Xcode. My code is: #include <stdio.h> #include <stdlib.h> int main (int argc, const char * argv[]) { FILE *filePtr; filePtr = fopen("test.rtf", "r"); if (filePtr == NULL) { fprintf(stderr, "Can't open \"test\"\n"); exit(EXIT_FAILURE); }...

How to change the name of the app on the iPhone?

I did this before, but can't remember it now. I want to change what appears under the icon of my app on the home screen. Where in Xcode do I do this? ...