xcode

How to add an animation to the UIView in viewDidAppear?

I tried to add a animation to viewDidLoad and viewDidAppear, but it doesn't work: - (void)viewDidAppear:(BOOL)animated{ [UIView beginAnimations:@"transition" context:NULL]; [UIView setAnimationTransition:110 forView:self.view cache:YES]; [UIView commitAnimations]; } Why? ...

XCode 3.1.2, header file not found

Hi All: I have been trying to build a code that has dependencies with other header files that are not in the project directory. I added the paths to these header files in both HEADER_PATH and USER_PATH. However, I still see error while building. It says that the file is not found. I verified that the file exist in the path added t...

How to see UITableViewDelegate in Interface Builder?

I have a UIViewController that I've added UITableViewDelegate to. This controller has a corresponding nib. I've associated the two in IB. However, the nib's File's Owner doesn't show the tableview delegate or datasource. I have a similar controller and nib where the tableview delegate shows up fine in IB. I can't see any differences...

XCode - iPhone SDK Zombies

I was just wondering if NSZombiesEnabled is supported when debugging applications using built with a target of the iPhone SDK 3.x Also if it is supported, is there anywhere I can get a list of the possible levels supported? Regards ...

Get router mac (without system call for ARP) in Objective-C

Ok - I am writing a daemon in Objective C that checks the connected router mac address every 5 seconds. I am completely new to objective C, and I am looking for a better way to do what I'm already doing. I'm currently calling "arp -a" and parsing the results via "Task": NSTask *task; task = [[NSTask alloc] init]; [task setLaunchPath...

Why [object doSomething] and not [*object doSomething]?

Hi, In Objective-C, why [object doSomething]? Wouldn't it be [*object doSomething] since you're calling a method on the object, which means you should dereference the pointer? Thanks! ...

How do I create a multilevel popup prompt like in Settings-Safari-Clear History?

I have a UITableView settings screen with options important enough that I should be asking the user to confirm whether or not they meant to hit them. I want to follow the apple convention as much as possible, thus I'd like to implement a warning that looks like this: http://img.photobucket.com/albums/v283/DurAlvar/Screenshot2010-02-03a...

Aaron Hillegass _Cocoa Programming for Mac OS X_ Chapter 9 Question

In Aaron Hillegass' Cocoa Programming for Mac OS X, Chapter 9, the section called "Begin Editing on Insert", he explains how to do exactly that. The thing that confused me though, was that he did a bunch of other stuff. Here's the full code listing: - (IBAction)createEmployee:(id)sender { NSWindow *w = [tableView window]; // Try to end...

iPhone XCode - How to change title below app icon

Hi, What is the best way to rename the app so that the title below the app icon can have spaces but the build files doesn't have spaces. (ie, title is "My Project" and build file is MyProject.app) I changed PRODUCT_NAME but when I do that the app file also contains spaces. Renaming all the fields seems to work fine except I can't find...

I can't seem to connecting any of my IBOutlets between IB and XCode.

I created a new iPhone project using the built-in "tab bar" template. I put a few sliders, labels, textfields in the view. I added in needed code for: "IBOutlet, @property, @synthesize, and release" for the above UI objects. It saves and compiles without any errors or warnings. I try to hook-up my connections with control-drag, but d...

Releasing "referential" variables in method scope.

In objective-c (cocoa touch) I have a series of UIViewControllers that I am switching between. - (void)switchViews:(id)sender { UIButton *button = (UIButton *)sender; UIViewController *nextViewController; int tag = button.tag; switch (tag) { // -- has already been created case kFinancialButton: ...

NSDictionary - Need to check whether dictionary contains key-value pair or not

Hello Every one. I just need to ask something as follow. Suppose I am having a dictionary. NSMutableDictionary *xyz=[[NSMutableDictionary alloc] init]; [xyz setValue:@"sagar" forKey:@"s"]; [xyz setValue:@"amit" forKey:@"a"]; [xyz setValue:@"nirav" forKey:@"n"]; [xyz setValue:@"abhishek" forKey:@"a"]; [xyz setValue:@"xrox" forKey:@"x"];...

NSZombieEnabled in latest Xcode

How do I set NSZombieEnabled and CFZombieLevel for my executable in the latest version of Xcode? ...

Weird Error from Xcode Debugger

Hi there, I am using SQL lite database in my iPhone app. I have a refresh button on my Home screen and upon click of then refresh button I parse data from my web service and store the results into a SQL lite database. When I click on refresh button repeatedly I get an error. The error occurs after a variable number of clicks/refreshes e...

gdb debugger in xcode doesn't work

I'm trying to use direct commands to gdb through xcode's console window when the program is paused. But the (gdb) prompt just accepts the carriage returns, and does nothing. Has anyone encountered this? I'm on the latest version of Mac OS X (10.6.2) with the XCode 3.2 beta. ...

Running Xcode iPhone unit tests with Cruise Control

When using Cruise Control to build an iPhone XCode project with Unit Tests, an error of "Code Sign error: a valid provisioning profile matching the application's Identifier 'com.yourcompany.Calculator' could not be found" is generated. This isn't encountered when run through XCode? Is Cruise Control trying to launch the app rather than j...

Saving application data state on exit

I have an NSMutableArray with 24 strings. I need to save this data if a user gets a call or quits the application. I have been looking into many examples but for some reason can’t seem to determine the best way to save the data. The 24 strings correspond to 24 buttons and their state. When a button is clicked, it displays the corr...

iPhone: Calling [NSBundle mainbundle] Crashes on the Device But not Simulator

Basically the problem is exactly what the title says. My app works smoothly on the simulator, with no crashes whatsoever. In fact, the previous version is on the app store. I made minor changes here and there and suddenly it started to crash in a very odd place. I use [NSBundle mainBundle] resourcepath] in various places in the code to...

Evenly aligning things in IB

I have ten labels on a view positioned vertically. I need to evenly space them. Does IB have any type of setting that will do this? ...

Interface Builder: XIB Refactoring

Hi, is there a way to move a UITabBarController defined in the MainWindow.XIB in a separate XIB? I would like to load the TabBarController (RootViewController of my App) asynchronously while the user is stareing at the login screen to speed up the App launch time. Currently the TabBarController is loaded with the Main-Window and 'wired'...