iphone

Is it possible to use UIPickerView in cocos2d?

hello, I am developing iPhone 2d game by using cocos2d. I need a Picker. Is it possible to use Picker in cocos2d ! If possible then tell me, How can I use a Picker in cocos2d ? ...

UIWebView and PDF files

I am loading a relatively small PDF file (140kb) using UIWebView and even though this is working fine, I'm finding it lags a lot when I scroll and zoom. The PDF is a map so there's quite a lot of text and lines on it so I'm wondering if there's any way to accelerate it somehow so everything moves smoother? Would converting to PNG work be...

What is the default height of UITableViewCell?

I thought this information would have been easier to find :-) What is the default height of a UITableViewCell? It looks like 44 pixels, but I'd prefer to be sure. ...

Why am I having trouble with a deep copy in Objective C?

I'm assuming my understanding of how to perform a deep copy isn't just there yet. The same with some sub-optimal memory handling that I'm performing down below. This code below probably depicts a shallow copy, and I believe that's where my problem might be. I have some cookie-cutter code for an example that looks like the following: NSA...

How expensive is UITableView's reloadData?

I'm curious just how expensive in as far as resources go is UITableView's reloadData? I have an app which will make roughly 10 subsequent HTTP requests, and as it gets data / preps, it reloads the tableView. As the data set grows larger and larger, it's becoming very sluggish. I'm trying to figure out if it's because of the amount of tim...

Loading cells via nib and referencing components in them

I'm loading a UITableViewCell that contains two tagged labels. The user will leave the current view, containing the following code and go to another view. A name value is set there and the user comes back to this view (code below). I assign the name they set in the other view to the name label. That works but I get a new label misal...

UIScrollView Touches Don't Seem to Work

I used the "View-based Application" template in Xcode for an iPhone project and went into the view controller XIB. I changed the view from a basic UIView to a UIScrollView, and now the method - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; never gets called. I have an NSLog statement in there. It gets called just fine w...

How do I prevent Core Animation blocking my main thread?

I'm aware of the fact that Core Animation dispatches its animations in a seperate thread, as stated in the documentation. Nevertheless, my animations seem to be blocking my main thread. All animations start and finnish. (With or without kCATransactionDisableActions set as true.) but become jumpy and the main runloop stalls. What am I do...

iPhone SDK Internet connection detection

I'm working on an iPhone application that makes a few calls to web services. I posted this application on the Apple store but it got rejected (and rightly so) since there was no error message displayed to the user if no Internet connection is available. Since obviously the application would not work without it. So I just wanted to know ...

Multi-touch is not working in the iphone app I'm building

I have the following code: - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { NSUInteger touchCount = 0; // Enumerates through all touch objects for (UITouch *touchb in touches){ touchCount++; } // When multiple touches, report the number of touches. if (touchCount > 1) { lblStatustouch.text = [NSString stringW...

How do I simulate a slow internet connection (Edge/3g) on a mac. Is there a Firefox plugin?

Exact Duplicate: http://stackoverflow.com/questions/473465/firefox-plugin-to-simulate-slow-internet-connection How do I simulate a slow internet connection (Edge/3g) on a Mac? Is there a Firefox plugin? ...

Is it possible to programmatically mute the iPhone?

I've seen techniques to make sure that an app respects the mute switch, but is it possible to set the iPhone to mute (no sounds from any apps) using the SDK? ...

Trying to include iPhone OpenGLES headers in C++ code

I have some C++ doing OpenGL drawing and am trying to figure out how to include the opengl headers without it giving me thousands of errors in the obj-c code. ...

How to compile simple C file using GNU C Compiler/gcc & Mobile-Terminal on the iPhone?!

How to compile simple C file using GNU C Compiler/gcc & Mobile-Terminal on the iPhone?! Do I need extra files? ...

How mature is SDL for iPhone?

For a while I've been thinking of trying to do a port of one of my favorite classic PC games, The Ur-Quan Masters (aka Star Control 2) to the iPhone. UQM uses SDL for all its graphics, sound, input and other gamey stuff and there does seem to be a port of SDL to iPhone but it doesn't look very mature at this point. Has anyone put the iP...

Where are downloaded sound files saved?

When I download a sound file in my iPhone, in which directory is it stored? ...

How to prevent UIView's drawRect from clearing out the paths drawn by previous drawRect calls?

Everytime UIView's drawRect is called, the content drawn by previous drawRect (using Core Graphics) is cleared out. How can I make it so that the paths rendered from previous drawRect calls stay until I explicitly clear it? ...

Linker error when trying to use MPMoviePlayer

On a fresh install of XCode 3.1.2, I'm trying to use the iPhone MoviePlayer as shown in the sample code at http://developer.apple.com/iphone/library/codinghowtos/AudioAndVideo/index.html#INITIATE_VIDEO_PLAYBACK_IN_MY_CODE However, XCode reports the following linker errors when I try to build-n-go: Building target “EOY” of project “EOY...

Does it make sense to first learn Cocoa for Leopard and then Cocoa Touch for iPhone?

Actually I don't care too much about Mac OS X development. I want to do only iPod Touch and iPhone development. But anyways, I started learning Cocoa and Objective-C. But it seems like there are many differences between Cocoa and Cocoa Touch, so I am wondering if I am actually wasting my time. Should I just jump directly into iPhone topi...

Proper checking of nil sqlite text column

I have an sqlite string column that is assigned to a string. I need to make sure it isn't nil before assigning. I'm doing this: char *isNil = sqlite3_column_text(selectstmt, 2); if(isNil != nil){ myName = [NSString stringWithUTF8String:(char *)sqlite3_column_text(selectstmt, 2)];} which gives the warning: warning: initialization ...