xcode

switch between xibs on button action

I'm having difficulty in switching between xibs :( first i was using navigationController and it worked well but i want to do it without using navigationController. I tried presentModalViewController but it crashes my application. :(( Here is the code : myViewController *viewController = [myViewController alloc] initWithNibName:n...

Button Pressed method location

This is probably going to be tough to explain. Basically I have the following structure to my project: I have an object (graph) which controls other objects (nodes) and (arcs). Everything is working fine and dandy but I've found the need to add buttons to my node objects. This is working fine too, I have an NSLog output letting me kno...

Stop sound when user push home button

I play a sound in viewDidLoad now when user push home button sound paused.when user run app again sound play from place that paused before.how can i stop it(no pause) when user push home button? ...

Tap once to copy UITextView text substring

Say you've got a UITextView populated with a chunk of text. When a user taps on a word within the text I want the app to copy (retrieve the string) that word immediately. In your knowledge, is there any practical way to do this? Side note: I looked at UIPasteboard and all that but it is NOT what I'm looking for as it does not offer a o...

Carriage return inconsistency with XCode

Hello all, I have a problem using a carriage return to rewind to the beginning of a line within XCode. This small example: std::cout << "will not see this\rwill see this" << std::flush; std::cout << std::endl; // all done compiled in XCode results in: will not see this will see this whereas, when I compile it in the term...

why does iphone-xcode leak tool show a leak for this code?

I've gone thru my app using build/analyze and been able to resolve all issues. but running under leak tool it detects a leak and says it comes from tvc:viewDidLoad where tvc is a tableViewController it further references NSArray -> sectionlist it shows a malloc refct=1 then a retain refct=2 then a release refct=1 here is viewD...

automatically build, deploy and test on iphone device

Is there way to build iphone app on the command line with xcodebuild, then automatically deploy the app to a USB-connected iphone device and run some unit testing on device? Right now, I can do this under xCode with "Build and Run", but I'm looking for solution to do this outside of the xCode GUI environment. Thanks ...

- (void)applicationDidEnterBackground:(UIApplication *)application

Can i use below method somewhere other than AppDelegate ?if yes how? - (void)applicationDidEnterBackground:(UIApplication *)application ...

The iPhone Simulator from xCode 3.2.4 has a problem with sliding!

The problem is shown better in this video I uploaded to youtube. It seems the iPhone simulator doesn't slide the views correctly. It seems to get stuck and the view doesn't return. Like you see in the video, switching between springboard pages doesn't work as it suppose to! I need to make an additional click to make the page go in positi...

Xcode: multiple projects, more than one main executable

Hi I'm new to Xcode. I'm trying to learn c++ and I was wondering if it is possible to have multi projects and choose which project should run. I used ms visual studios before and I like how under a solution I can create multiple projects and choose which one is the executable one. Xcode also has targets not exactly sure what they are may...

iPhone Apps exit straight away with status 45

For some reason today every iOS app that I try to debug on my device crashes straight away(the loading screen will show for a second) with exit code 45 when I build and run from xCode. This was working fine when I went to bed last night. Now it happens with every single apps even something like a hello world one. The run fine on the simu...

How to re-enable CoreLocation prompt in xcode?

Hi, When I first ran my app that uses CoreLocation in the iPhone simulator, I was prompted with the dialog saying that my app would like to use my current location. In that popup, there is a checkbox that says never ask again. I had that checkbox selected, and now I never receive that popup again. How can I revert this change? I'd l...

cancel UIView Animation

I use below code for shake button How can i cancel it when it's in progress? #define RADIANS(degrees) ((degrees * M_PI) / 180.0) CGAffineTransform leftWobble = CGAffineTransformRotate(CGAffineTransformIdentity, RADIANS(-10.0)); CGAffineTransform rightWobble = CGAffineTransformRotate(CGAffineTransformIdentity, RADIANS(10.0)); ...

how to close the application progarmatically when user taps on a button

hello all.I need to close the application whenever user taps on the button(i need to keep IBAction for closing the app).Like in games menu we have exit button when we tap on it we come out from the game.Same thing i need.How can i do this .Thanks in advance ...

how to access svn repository in xcode from another machine

I have installed svn in my mac mini and managed to configure it for xcode. I have also configured svnserve from these instructions - http://www.mindfiresolutions.com/configure-svnserve.htm Now I need to access the repository from my macbook. I tried configuring the repository in SCM menu in xcode . In url, I have put- svn://192.168.1.2/...

How to see the javascript errors of PhoneGap app in Xcode?

I want to debug my PhoneGap app in Xcode, but its Console can not show javascript errors. ...

Merging Xcode project files

There are often conflicts in the Xcode project file (Project.xcodeproj/project.pbxproj) when merging branches (I'm using git). Sometimes it's easy, but at times I end up with a corrupt project file and have to revert. In the worst case I have to fix up the project file manually in a second commit (which can be squashed with the previous)...

Drawing outside the viewport in OpenGL ES 2.0

Hi there, I was building a 2D project in OpenGL ES 1.1 but decided to switch to 2.0 since I was only going to be developing for the iPad. In 1.1, when a viewport is set up, the notion seems to be that you are viewing only a part of the full 3D space e.g. CGRect rect = view.bounds; glOrthof(-1.0, ...

Record Sound that play with AVAudioPlayer

with below code i can record sound but this way record any sound that play around device i just want to record sound that play with AVAudioPlayer in my app.is it possible ? NSError *err = nil; AVAudioSession *audioSession = [AVAudioSession sharedInstance]; [audioSession setCategory :AVAudioSessionCategoryPlayAndRecord error:&err]; [a...

UITableView has loaded data

hey everyone, I have a subview where there is an uitableview that gets data from an online server (title, subtitle and image). When I click the button that shows the subview it takes a little time to get there using WiFi connection, but under 3G network it takes longer, so that you really feel the gap between loading the view and having...