xcode

"_FILE_AND_LINE_ is not defined in this scope" (compiling RakNet NAT examples in OS X)

Hello! I'm working on a RakNet-based project (using 3.8 on OS X 10.6), and I'm trying to work through the various examples that demonstrate the parts of RakNet I want to use. For the "NatCompleteClient" example, I've imported the source into a command-line project in XCode, along with the UPNP dependency. At compile time I've had a few...

How to use a method with more than one parameters to create custom buttons

I am repeating my codes few times to create custom buttons, I am trying to create a method and create all my required buttons just by called that method and using two parameters, btnTitle and btnAction. My Codes for the method -(void) addnewButton:(NSString *) btnTitle withAction:UIAction btnAction; { // Add a custom edit navigati...

C++ program infile won't open in xcode?

Why does the c++ program produce the error shown? I'm especially confused since outfile opens without error yet infile displays the error? Both are defined in xcode exactly the same!! I've altering the "path type" setting without success. The open on infile always fails! Any suggestions would be very much appreciated!! For those...

Restoring older firmware through XCode?

I'm trying to restore iPhone OS 3.1.3 to a 3GS that has been upgraded to iOS 4. iTunes refuses to complete the install. What needs to be done? I am currently using the GM XCode. Should I be using the latest public stable version instead? Update: XCode reports that "The baseband cannot be rolled back". ...

XCode can't find base SDK

XCode 3.2.3 Beta does not allow building for below 3.2. I opened a project that was made in an earlier XCode. For some reason, the base SDK is reported as missing even after changing it to 4.0. Other projects from earlier XCode do not have this issue. What can I do? ...

How do I change my iPhone App binary filename

I get the following error when I try to upload the application on iTunes Connect: "Binary file names cannot contain a space. Please rename your binary file and try again." If I try to Validate the Application in XCode, I get: "My Application.ipa: filename may not contain whitespace" So I guess I have to find a way to rename this .ipa ...

SplitView app with master and detail view visible in both orientations

Hi all, I would like to have both master and detail views visible in landscape and portrait modes. Like how the Settings app is implemented. I do not find any samples for this. Appreciate your help.. ...

Formatting the number entered in textfield in iPhone

I have a text field where the user enters a number, which is in the range of thousands. I want the text field to be formatted as the user enters the number, example : 200000 should become 200,000. how do i go about doing this?? Many Thanks, S ...

How can I run Gcov over an installed Cocoa application?

I have a Cocoa application which uses an installer. I want to be able to run code coverage over the code (after it has been installed). This is not the usual unit-test scenario where a single binary will run a suite of tests. Rather, the tests in question will interact with the UI and the app back-end whilst it is running, so I ideally ...

Updating UIView subclass contents

Hi; I am trying to update a UIView subclass to draw individual pixels (rectangles) after calculating if they are in the mandelbrot set. I am using the following code but am getting a blank screen: //drawingView.h ... -(void)drawRect:(CGRect)rect{ CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetRGBFillCol...

How to integrate FFTW3 into an iPhone app?

I'm trying to integrate the FFTW3 (a GNU FFT library written in C, http://www.fftw.org/) into an iPhone app. I downloaded the source code and I found there are hundreds of .h and .c files along with a lot of other files I can't recognize. I'm not a linux expert so I don't really understand how the .configure file and other similar files ...

how to move label text to centre of the label programatically

i have a cell in which 2 labels are present,i want to move top label to align centre and label to to disappear ,how can i do it ... please any one help me.... ...

Aaron Hillegass Chapter 18 Challenge Question

I am working through Aaron Hillegass' Cocoa Programming for Mac OS X and am doing the challenge for Chapter 18. Basically, the challenge is to write an app that can draw ovals using your mouse, and then additionally, add saving/loading and undo support. I'm trying to think of a good class design for this app that follows MVC. Here's what...

Can you see the values of NSUserDefaults anywhere in the xcode debugger?

Can you see the values of NSUserDefaults naywhere in the xcode debugger? Just wondering if this is possible? Thanks, Nick ...

Java not working on MacOS X Leopard

I'm running Leopard, xcode 3.1.3. When I type "java" at the command line I get this: dyld: could not load inserted library: /usr/lib/libSaturnFE.dylib Trace/BPT trap What did I do? I did do some profiling with Saturn a while back but I didn't know it was going to screw up my machine. I'm fairly sure it worked when I first installe...

3.1.3 and 3.2 different behaviour

I'm using a custom cell in tableView with a UITextField - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell =...

+(void) initialize in objective-c class static variables constructor

I found some sample code from here. static UIImage *backgroundImageDepressed; /** * */ @implementation DecimalPointButton + (void) initialize { backgroundImageDepressed = [[UIImage imageNamed:@"decimalKeyDownBackground.png"] retain]; } is it something like this - +(void) initialize method initialize static variables of a class...

how to come back from my sub view

i have a button on the main view and when i pressed the button i wrote an ib action to open a text view programmatically to appear and it will cover my original view . i placed a button now on text view programatically. how can i come back to my super view or main view when i pressed button on text view can any one send me syntax for ...

Why doesn't genstrings convert NSLocalizedStringFromTable entries to table.strings?

In my source code I have some lines like NSLocalizedStringFromTable(@"Info", @"en", @"Title of this view"). When I subsequently call genstrings -o en.lproj ./Classes/*.m I would not get the expected file en.strings but Localized.strings, although I've read in the genstrings-manpage that it would generate a table.strings file from NSLocal...

How do I create custom subviews from a UINavigationController in xcode?

I am definitely the NOOB here, so let me pre-apologogize for asking how to write this application. In a nutshell, this is what I am trying to do. I will have a main View Controller. There will be 3 buttons. 1 for information, 1 for Food Menu items (TableView), and 1 for Common greetings. I am stuck on creating a tableview that will h...