xcode

How to jump forward/backward from Xcode split window?

I used to split my Xcode window to 4 sub windows (not popup). I wonder if there's shortcut key to move cursor from one sub window to another ? +++++++++++++++++++++++++++++ + + + + + G / + F1 + F2 + + r F + + + + o i +++++++++++++++++++++++ + u l + + + + p e + F3 ...

Objective-C changing random values for variables

This really is my last resort as I am absolutely stumped and I just know it is something stupid! I have a UITableView and a UISearchBar, the user uses the search bar to enter a location, which is then appended to a url with page=1. This is then sent to an api and a list of adverts are returned (this has been successful). The user can th...

Build fat static library (device + simulator) using Xcode and SDK 4+

It appears that we can - theoretically - build a single static library that includes both simulator and iPhone and iPad. However, Apple has no documentation on this that I can find, and Xcode's default templates are NOT configured to do this. I'm looking for a simple, portable, re-usable technique that can be done inside Xcode. Some h...

XCode compiles all source everytime

XCode compiles all source every time i build project and it takes a lot of time. Looks like precompiled headers don't work. It worked correct before i changed location of project. What shuold i do to make it work? UPD: it's fixed few minutes ago. I don't know how. UPD2: It's starts again! XCode compiles all sources every time i build. ...

How to call a method when user keep pressing a button?

Hi All, I know how to call a method when a button pressed. but, My problem is when a user keep pressing a button it has to call one method -(void)keeppressed { } where as it has to call another method called -(void)justpressed { } when user just taps the button is there any solution? ...

How can I use a single UIToolbar with multiple different UIViewControllers?

I have a simple app with two basic screens, a UIMapView and a UITableView. I'd like to have a toolbar at the bottom with a couple of buttons and a UISegmentedControl with two segments: "Map" and "Table". (The layout is similar to the Google Maps app that ships with the iPhone.) How can I keep the same toolbar while presenting either the ...

Xcode fails to get the task for process XXX. How do I solve this? (iPhone SDK 4.0)

Hi, I have the following error when I try to run a new project on my ipod: Error launching remote program: failed to get the task for process 312. The program being debugged is not being run. I've read about Entitlements.plist, and I've tried to add the get-task-allow, but then it doesn't let me compile because of a code signing erro...

XCode IDE Method/Class Definition Drop Down

Does anyone know if there is a way I can get the XCode method/class definitions (which currently sit in a drop down in outline form) list to stay permanently in a window? I'd like to dock it somewhere in order to help me move around in my classes instead of using the drop down menu at the top of the window. Any ideas? ...

Why am I getting an error?

The following line of code compiles with the following warning: Code: [[[AVAudioPlayer alloc] initWithContentsOfURL:url error:&error] play]; Warning: /Users/moshe/Development/iPhone/Apps/Live/iDecide/iDecideViewController.m:29:0 /Users/moshe/Development/iPhone/Apps/Live/iDecide/iDecideViewController.m:29: warning: multiple me...

What tools might I use for generating documentation for an Xcode project?

I am wondering which tool can be used in Xcode to generate the documentation for an iPhone project, so written in objective-C and C mostly, but also helping designing the code. The documents I'd like to be produced are: UML-like class diagrams (with generalization, aggregation and composition relationships) UML-like components diagram ...

A problem when add Library in Xcode

i try to add ZipArchive folder that contain source code, then drag and drop to my project when i try to include #import "ZipArchive/ZipArchive.h" why it report error: ZipArchive/ZipArchive.h: No such file or directory if i import #import "ZipArchive.h" it will work, what is my fault? ...

NSObject is undefined (objective c)

This is more then likely a very simple question but I am completely stumped by it (and more then a little embarrassed by the situation). I have the following code in a command line utility in xCode: #include <CoreFoundation/CoreFoundation.h> int main (int argc, const char * argv[]) { NSFileManager *filemgr = [NSFileManager defaul...

ZipArchive library compile error.

i have included libz.1.2.3.dylib after insert code ZipArchive* za = [[ZipArchive alloc] init]; error when compile "_OBJC_CLASS_$_ZipArchive", referenced from: UPDATE according to http://code.google.com/p/ziparchive/wiki/PageName i have include ZipArchive folder to project, and and framework libz.1.2.3.dylib. then i try to un...

navigate to custom cells

Hi, i've created a custom cell table view with the following header file: @interface Tab1 : UITableViewController { ApplicationCell *tmpCell; NSArray *data; } and i have individualcell class and nib file, there is no nib file for tableview since i am using custom cell. this function works fine. now i want to have this custom cell v...

How to make a ball move along the edge of a rotating rectangle in xcode?

I wish to make a lever and rotate the lever using accelerometer. I have this problem trying to place the ball on top of the lever and slide the ball along the lever according to the rotation. Would anyone drop me some hints or refer me to sample codes? ...

When should I use Class Method instead of an init Instance Method?

This is an example straight from Apple's documentation - @implementation MyClass - (id)initWithString:(NSString *)aName { self = [super init]; if (self) { name = [aName copy]; } return self; } + (MyClass *)createMyClassWithString: (NSString *)aName { return [[[self alloc] initWithString:aName] autorelease];...

Change xcode's environmental path variable

I migrated from iphoneOS3.1.2.sdk to iphoneOS4.0.sdk and had to re-reference all frameworks. The old OpenAL reference is getting stuck in the build script as I see the new one but the old one is also there: Ld build/Debug-iphonesimulator/AweTrainGameEngine.app/AweTrainGameEngine normal i386 cd /Users/yuri/Desktop/AweTrainGameEngine ...

Getting a series of methods completed before UITableView delegate methods are called

Hi. I have a bunch of connection related methods that I need to execute before the table is actually being populated (before any of the delegate methods for a UITableView are called). The connection methods will add objects in a NSMutableArray that will later be used to populate the table view. Is there a way to tell the iPhone to wait...

iOS custom URL scheme for contacts app?

Hi Everyone, So I am trying to write an app that does a person search of my company. When it returns a result, I want to include a feature to add the person to the iPad contacts app with the push of a button. The problem is I can't find a way to launch the contacts app through a custom URL scheme with the person info as parameters. Do...

uikeyboard return

Hello all, I have one view name:myplay.h and myplay.m my view contain one textfield name txtplay.. It contain one button name btnplay. In button event i want to check that if uikeyboard is open then close it. I know below code - (BOOL)textFieldShouldReturn:(UITextField *)textField { [textField resignFirstResponder]; return TR...