xcode

shouldAutorotateToInterfaceOrientation won't work!

Hey. I've been writing my Universal application in portrait mode, and now after about 15 nib files, many many viewCotnrollers, i'd like to implement the shouldAutorotateToInterfaceOrientation and desing some screens in Landscape mode. adding : - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientatio...

XCode - Linking Tests with Sources without adding all source files to the Test Task.

In Xcode, when source and test classes in are different folders - In the 'Test' task - how do you link against the source, as opposed to adding the all source files to the test task ? ...

XCode - Automatically add all files in a folder to a target

In XCode, is there a way to specify that all files in a folder are compiled by a target. Eg. the 'Test' target automatically compiles all files in the 'Tests' folder, whereas the 'App' target compiles everything in the 'Sources' folder. Today, the way I'm doing it, is to add a file to a target everytime I create it. This feels a bit erro...

XCode - Run Focussed Test

In XCode - Is there a way of running just one test(one test case or preferably one test method). What I do today is to run the 'Test' task which runs all tests and takes up a lot of time. Thanks ...

Getting a particular menu item from MainMenu

I have a nib (winA.xib) that contains a window. My app delegate contains an NSWindowController subclass called WinAController. WinAController has a property (NSMenu *mainMenu) that I want to point to the MainMenu. I have set it after I instantiate WinAController with this code: WinAController = [[WinAController alloc] initWithWindo...

Three20 JSON problem: Can deploy to simulator but not device (extThree20JSON)

Everything builds and runs in the simulator fine ... but when I attempt to run on device I get: "arm-apple-darwin10-gcc-4.2.1: ..../three20/Build/Products/Debug-iphoneos/libextThree20JSON+YAJL.a: No such file or directory" I check that directory and indeed the file doesn't exist. It does exist in the "Debug-iphoneosimulator" t...

Array of Arrays - writing to File problem

Hi, and again my array of arrays ... I try to improve my app performance by buffering arrays on file for later reuse. I have an NSMutableArray that contains about 30 NSMutableArrays with NSNumber, NSDate and NSString Objects. I try to write the file using this call: bool result = [myArray writeToFile:[fileMethods ...

How to setup MGTwitterEngine

Just downloaded from github ... tried to build the xcode project and got over a hundred errors. TouchJSON, OAuthConsumer and yajl folders don't even exist (which looks like the problem). Did I pooch something? What do I need to do to recover? Thanks ...

How to write little plugin in xcode for Apple Motion?

Hey. I want to write a little plugin in xcode which reads lights position in opened Apple Motion graphic scene. Anybody can tell me where i should start? What project in xcode, what library i need and what should i do to read sth from Apple Motion? Thx! ...

expecte ')' before className

Hi I have a class DataObject as Header ::: #import <Foundation/Foundation.h> @interface DataObject : NSObject { NSString *erorrMessage; BOOL hasError; NSDictionary *dataValues; } @property(nonatomic, retain)NSString *erorrMessage; @property(nonatomic)BOOL hasError; @property(nonatomic, retain)NSDictionary *dataValues...

How do i know in the detail view what cell in tableview was selected?

how can i know what tableview cell was selected?(being in the detail view) The problem is that. I have an table view controller. Here are parsed from the internet entries to the table. So it's a dynamic tabe view that loads from internet. I will not know how many entries will be in the table so i will not know what details view to call w...

Struggling With NSWindowController window Outlet

I'm sure this is a really simple problem but I am pulling my hair out over it! I have a subclass of NSWindowController called WinAController. This has been created in IB and is in MainMenu.xib. I have a separate nib called WinA.xib that contains just a single window. In this nib, I have set the following: Class of File's Owner to Win...

gdb+osx: redirecting stdout may cause printf to have a 2**14 bytes buffer?

I attached to a program with gdb in OSX and I want to use CFShow in the gdb console etc. However, nothing shows up. printf shows nothing as well: (gdb) call (int) printf("Hello\n") $10 = 6 (gdb) call (int) printf("Hello World!\n") $11 = 13 Apple suggests the following tip for when attaching with gdb, to make the output appear in the g...

How change a CGContext attribute after drawRect is carried out

Hi, I draw a path using CGContext. How can I later change one of the path attributes after drawRect was carried out (completed)? I want to be able to change the color of my path according to a slider value. ...

Multiple View App shows Blank Screen in Simulator

Hello; I am developing a simple app that first shows a menu screen, and when a button is pressed, a game screen appears. I was able to develop the game screen without any issues, but when I changed the code to first display the menu, the simulator showed a blank screen. I've read all the articles on connecting views with IB but I can't...

Adding UINavigationBar to a UITabBarController

Ok so I actually got to add UINavigationBar inside a UITabBarController using the following tutorial: http://twilloapp.blogspot.com/2009/03/how-to-embed-navigation-controller.html But now the issue is that whenever I add a new button inside one of the views it just crashes. For example: In the first view called FirstViewController I a...

Problem with Xcode organizer screen capture

I'm currently running Xcode 3.2.2 on Snow Leopard. When opening Organizer > Screenshots I see a list of screenshots I did before. But when I click the Capture button, nothing's happening. I don't see any messages popping up or any errors from the Console tab. I also tried restoring the iPod Touch (2nd gen) but that didn't help. Any thoug...

How to fix "failed codesign verification" of an iPhone project?

Last night, the iPhone project was built perfectly. This morning, I installed XCode 3.2.3 in a separate folder. When I open the same project in the old XCode 3.2.2 and re-built the project. I got this warning: Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission ce...

Stop scrolling to top in UIWebView - iPhone

I have placed following javascript in my html file. <script TYPE="text/javascript"> function srk(){ document.ontouchmove = function(e){ e.preventDefault(); } } </script> I am scrolling my webview by following code with some animation. [myWebView stringByEvaluatingJavaScriptFromString:[NSString st...

custom Copy Responder in iphone

Hello ! I have a webview in my application. I want to handle when user copies something from web view, my custom method - should be triggered. I have tried following. I have placed following method in myViewCtr.m file -(void)copy:(id)sender{ NSLog(@"hi ! Hello "); } But nothing working - What should I do to implement the same ?...