xcode

How to redirect the nslog output to file instead of console.

I have cocoa application running on OS X. I have used NSLog for debugging purpose. Now I want to redirect the log statements to file instead of console. I have used this method but it results logging in Console as well as in file. - (BOOL)redirectNSLog { // Create log file [@"" writeToFile:@"/NSLog.txt" atomically:YES encoding:...

How to make cocos2d sprite scale up and down (for a pulsating effect) every second?

I want to have a sprite scale up and down once every second to make it seem like it is bulging and pulsating. How can I do this? ...

iPhone: Is it possible to have an 'info'-button in all views in my app?

Hi, As mentioned in the title, how do I implement such a functionality? I am using the code below, (in my viewDidLoad), to get the button on my Navigation Controller of my main view. UIButton* infoButton = [UIButton buttonWithType:UIButtonTypeInfoLight]; [infoButton addTarget:self action:@selector(viewWillAppear:) forControlEvents:UI...

What silly noob mistake am I making here?

I have a method: - (CGPoint) calculateVectorBetweenThisPoint:(CGPoint)firstPoint andThisPoint:(CGPoint)secondPoint { float xDif = firstPoint.x - secondPoint.x; float yDif = firstPoint.y - secondPoint.y; return CGPointMake(xDif, yDif); } And I try to invoke it as follows: - (float) angleBetweenThisPoint:(CGPoint)firstPoin...

xcode crashing when missing ( on function return param

I've just finished debugging a particularly painful problem where xcode would hang/crash during a compile, and then later when I opened a particular file (once I identified which file) At one point, it was generating 55k+ errors. @interface someviewcontroller: UITableViewController { someeditviewcontroller *editView; -(classObje...

Decrease iPhone App Size

hi, I want to decrease my iPhone app size. Any suggestions? Taimur ...

How attach code to a running iphone app.

Hi, I am trying to fix a random hang in my iphone app. I could not regenerate the hang from launching it from the xcode. Is their any way to attach xcode debugger, as soon as I detect the hang? (I can attach it to 'instruments') but it did not much help. ...

IPhone App: UIScrollView scrolls to bottom when it loads

I have a detail view for a contact. The last field is a Textview that can be as short as 1 line and as long as 20. in the viewDidLoad method I use: scrollView.contentSize = self.view.frame.size; My problem is that when the data is displayed, the scroll view scrolls to the bottom on its own. Obviously I would like it to start at the to...

Targets, Xcode and interface files.

I have two apps which share a lot of source, so I want to put them into one Xcode project and use Targets to build them seperately. Some of the source files have the same name in both projects (for example, MapViewController.h and MapViewController.m). I thought as an intermediate step, I'd just put the whole classes folder into the merg...

Xcode: Architectures settings for a universal\iOS4 app

Hi all, I was wondering what my project settings should be in case I have a universal app that I am now updating to 4.0. The Base SDK is iPhone Device 4.0 iPhone OS Deployment Target is iPhone OS 3.0 What should I enter in the Architectures, Build Active Architecture Only checkbox and the Valis Architectures for the different configur...

UI Automation FrameWork for iPhone.

Hi All I am exploring the newly exposed framework UI Automation in iphoneOS 4.0. Has anybody tested their application using this framework. I will appreciate any help. I am trying to test a sample application that just contains a textfield and a button. I have written a script as [color=#1C2837][font=arial, verdana, tahoma, sans-ser...

Upgraded xcode 3.2.3 and breakpoints now show in asm view only

I just upgraded to xcode 3.2.3 and snow leopard and my breakpoints now only show in asm. All the files in the callstack leading up to the topmost one show in my C source however. Does anyone know of an issue where after upgrading the breakpoints suddenly do not show in C, or is this some simple option that possibly got set when it read...

How to manage TabBarController on new view after viewController push action

Hello, I have a problem building applicatin with tabBarController. There is no problem doing tabBarController with navigationController if I build it from AppDelegate. But now I have experienced problem when I want to create new view with tabBarController (3 tabs and each has navigation controllers) after a push from previous navigatio...

NSDate timeInterval = nil

I am trying to compare two NSDates one is created by the viewDidLoad method and the other by clicking a button. I want to be able to click the button and find the time difference since the viewDidLoad was ran. I keep getting a difference of nil. Any Ideas? #import "TimeViewController.h" id startTime; @implementation TimeViewControlle...

Matrix malloc Image Processing

Hello guys, I 'm trying to develop an Image Processing application for the images stored at the photo library of the iPhone, but to tell the truth I am confused. I'm interested in getting the A R G B matrixes out of the image. then make some algorithm with these matrixes and then releasing them. What would you prefer for the aforemention...

iPhone SenTestingKit failing to find AppDelegate in UnitTestBundle target

Hi, I'm trying to set up my unit testing for an iPhone application using XCode 3.2.3. I followed the steps in http://developer.apple.com/iphone/library/documentation/xcode/conceptual/iphone_development/135-Unit_Testing_Applications/unit_testing_applications.html As closely as I could, but I am getting this error message upon trying to...

Error with C++ operator overloading, in Visual Studio AND Xcode

...

How to solve "Cannot connect to server" message with wireless app distribution on iPhone iOS 4

I found the pre-release docs for this at https://developer.apple.com/iphone/prerelease/library/featuredarticles/FA_Wireless_Enterprise_App_Distribution/Introduction/Introduction.html (Developer account required) and some more at: http://jeffreysambells.com/posts/2010/06/22/ios-wireless-app-distribution/ I'm running into issues when I c...

How to put a view on the back button of navigation bar?

Hey guys, I am wondering how to put a view on the back button of navigation bar? Not on title view, but on the back button. It seems like to me that the back button is a UIBarButtonItem, which doesn't inherite UIView... Help please! Thanks! ...

Bindings in XCode 3.2.3

I'm trying to follow step 1 of this tutorial, which was made for an older version of XCode than the one I'm using. I'm supposed to drag a connection from a green NSObjectController icon to a blue object icon, and select the "content" outlet. However when I try to do this, no outlets are showing. How can this be done? ...