iphone

Memory issue with iPhone game animations using image sequences.

Hi, I am currently developing an iPhone game that has numerous animations using image sequences (jpg and png with transparencies). Using Instruments to view Leaks and Object Allocations, the most I've seen the object allocations go up to is less than 500k. However, the program still crashes and quits unexpectedly when we switch from one...

UIWebView in multithread ViewController

I have a UIWebView in a viewcontroller, which has two methods as below. The question is if I pop out(tap back on navigation bar) this controller before the second thread is done, the app will crash after [super dealloc], because "Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result...

ccTouchesMoved [touches anyObject] confusion??

Ok so I am still kind of trying to get my bearings in Objective-C and I thought I had it down but now I cam across this method. So there are is something that confuses me that I would like a detailed explanation on if possible. The first line: 'UITouch *touch = [touches anyObject];', now to my understanding anyObject is a hashtable? B...

Small video playback

From what I have gathered from internets the MPMoviePlayerController class doesn't support small video playback. So, in an effort to beat a dead horse I was wondering what kind of methods could be used to get a small video playing in a corner of the screen without interrupting the rest of the screen. So far we've come across two solutio...

What are prime commercial choices for iPhone game development kits/platforms?

I'm looking to get into (as everyone else) the iPhone game development business. I've been programming for a while but have only recently forayed into the Mac development world, although since I've been working with Java for a while learning Objective-C wasn't that big of a deal other than learning memory allocation. From this, you can...

How to tell when object is sent release message?

I'm working through a somewhat tricky iPhone crash, and it looks like the culprit is an NSString being prematurely released. I've switched on NSZombiesEnabled and can see that the NSString is a zombie at the time of the crash. However, I can't determine when the object is being released/dealloced--I've combed through my code looking for ...

UILabel inside a UIToolbar using IB is invisible on run, how fix?

I want to show a total inside a toolbar. I put in IB the UILabel on top of the toolbar . However, when I run the app, the UILabel is totally invisible (but can set values on code fine). The most bizarre thing is that in other form, all work fine. I don't see why in one form work but not in another... Any idea in how fix this? Or why i...

GLPaint save image

I'm trying to develop a complex painting application on the iPhone. I'm currently drawing using Quartz (e.g. CGContext...). Unfortunately the Quartz overhead is just too slow for the type of drawing I'm doing, and I'm porting to OpenGL calls using the GLPaint example as a reference point. Is there a way to get a UIImage/CGImage from t...

AVAudioPlayer iPhone question

With the AVAudioPlayer, can I stream live audio from my microphone? If so, how would I do this? ...

UIViewController subclass initialization

Say I have a FooController subclass of UIViewController that displays a list of Foos. What's the best practice for dealing with my foo property's lifecycle? Do I define the @property as being read/write? It's not really -- once it's been set, changing it would potentially result in inconsistent state. Do I create the @property as readon...

Scrolling of oversized view? (iPhone)

Hi, all! I imagine this is pretty dead-simple, but somehow I haven’t been able to get it to work: I need to display a View containing a group of controls (roughly 800px tall) -- which can be scrolled vertically by the user, as that view is too big to fit on the screen all at once. That’s it. I’d think that this might mean something l...

How to get a list of column names on sqlite3 / iPhone?

I want to migrate my iPhone app to a new database version. Since I don't have some version saved, I need to check if certain column names exist. This Stackoverflow entry suggests doing the select SELECT sql FROM sqlite_master WHERE tbl_name = 'table_name' AND type = 'table' and parse the result. Is that the common way? Alternatives...

Can I install an app to the simulator without the source code?

I have a client who wants to just drag and drop the binary to run it in the simulator. I want to build the simulator app and email it to them. What can the client do to install this in the simulator? Is this possible? Thanks for any help. ...

Quartz stretching image selected from imagePickerController

I have an app which allows the user to select an image from camera or photo library. It then places that image in a ImageView. I am then using Quartz to grab the image from that image view and render it along with some basic overlays etc. The issue is that when the image is picked from the camera, or from the camera roll Quartz draws ...

Is OpenGL required for my iPhone game?

On an iPhone: If I am writing a game that has multiple levels, with multiple animations (image sequences), jpg and png (transparent), some full screen and some not, some looped and some played once only. What is the best way of doing it? Each level might have up to 10MB of images. Add on to this music, and video (cut scenes). All 2D gra...

Access every button in a UIView on the iPhone

What I want to do is ideally loop through all buttons in a UIView (I have a lot, over 40 buttons), and depending on the tag, change the image that the button is displaying. Does anyone know how I can do this? Thanks!!!! ...

iPhone: Connecting to database over Internet ?

I've been talking with someone about the possibility of a iPhone development contract gig. All I really know at this point is that there is a company that wants to make an iPhone app that will hit their internal database. I'm not sure what the database type is( Oracle, MySQL, etc...). I've wanted to know if the database type was Oracle...

iPhone SDK 2: Programmatically adding an Info Button

I am trying to add an info button to my app to provide custom help. Instead of adding the button to the nib and linking the event (touchUpInside) to the controller, I decided to add the button programmatically. The button shows up. When I add the target event handler to be executed when the button is touched, it does not work. That my ...

Presenting modal view occasionally hides the navigation bar

I've come across this twice now. Sometimes using the following line of code: [self.navigationController presentModalViewController:aViewController animated:YES]; displays the view, but the navigation bar is then hidden. I can write: [self.navigationController setNavigationBarHidden:NO]; to my hearts content, everywhere I can ...

iPhone tab bar - how to change to another tab without touching a tab on the bottom.

I have a tab bar setup and I want to be able to let the user change options and after the last one is selected or by pressing a button on the view, be able to automatically switch to another tab. Simply, I have 4 tabs setup and on one, I pick an option or press a button and I want it to switch to the other tab. I have the tab bar on th...