iphone

MPMoviePlayerController retainCount goes from 1 to 3 to 2. Then hangs my app

Inside the simulator, I load up my movie using the method described here: https://developer.apple.com/iphone/library/codinghowtos/AudioAndVideo/index.html#VIDEO-INITIATE_VIDEO_PLAYBACK_IN_MY_CODE I'm doing an NSLog to show the retainCount before/after the play call, as well as before/after the release call in the notification. The count...

How to draw a transparent stroke (or anyway clear part of an image) on the iPhone

I have a small app that allows the user to draw on the screen with the finger. Yes, nothing original, but it's part of something larger :) I have a UIImageView where the user draws, by creating a CGContextRef and the various CG draw functions. I primarily draw strokes/lines with the function CGContextAddLineToPoint Now the problem is th...

In iPhone UIImageView, what method to override for instance variable init?

I have a very simple app that processes touches on a UIImageView derived view. The view has an array of rectangle coordinates that act as buttons. Since this is a simple app I handle all the touch events right in my UIImageView derived class. I need to init the array of image coordinates which is an instance variable. I tried overrid...

iPhone UIView Animation Best Practice

What is considered best practice for animating view transitions on the iPhone? For example, the ViewTransitions sample project from apple uses code like: CATransition *applicationLoadViewIn = [CATransition animation]; [applicationLoadViewIn setDuration:1]; [applicationLoadViewIn setType:kCATransitionReveal]; [applicationLoadViewIn set...

iPhone REST client

Does anybody know is there any good library for iPhone SDK to call REST web service. I want to have something simple like Heroku rest client ...

iPhone, how do you draw from a texturepage using coregraphics?

Hi, I'm trying to work out how to draw from a TexturePage using CoreGraphics. Given a texture page (CGImageRef) which contains multiple 64x64 packed textures, how do I render sub areas from that page onto the device context. CGContextDrawImage seems to only take a destination rect. I noticed CGImageCreateWithImageInRect, however this ...

Is there a way to pass touches through on the iPhone?

I have several UIButtons which I use to set the current action when tapping in the main area. I would also like to allow the user to drag from the button directly into the main area and take the same action; essentially, the touchesBegan and touchesMoved should be passed on to the main view when touching the UIButtons, but also should s...

A static SegmentedControl in a NavigationController, loading appropriate ViewControllers

I have 2 separate TableViewControllers. At one particular instance I would like to be able to load a ViewController which will place a SegmentedControl in the NavigationController...which in turn will load the appropriate TableViewController. Currently I have the SegmentedControl just pushishing the correct TableViewController and it...

iPhone Add support for Backgrounder

I'm trying to create a app for my personal use that uses Backgrounder. Are there any prerequisite that the app can be used by Backgrounder as it refuses to put my app in background. I have seen the wiki and Google code page of Backgrounder and it states "If you wish to run a non-AppStore 3rd-party application in the background, it is s...

How do I embed openads (Openx) ads in an iPhone application

I have tried using iframe, javascript and image tag Ad tags in iPhone application, but none of them work. When a user clicks on an image, the browser is launched but then nothing happens (you get a blank page). Anyone know how to proceed? ...

UITableViewCell weird behavior when table is scrolling out of view..

I have a class which extends UITableViewCell. For the purpose of this exercise, let's call it "CustomCell". In CustomCell, I have a UIImageView IBOutlet setup. The image instance name in this case is myImage. I wish to display this image based on certain criteria that's coming back from a server. That data is a dictionary which in this e...

iPhone SDK: IBAction

I have a situation where I'd like a button to respond to two different IBAction methods. Is there a way that I can force a particular method first? When I look at the buttons connections in IB they are in the correct order, but they consistently perform in the opposite order. ...

Flipping UIViews From Top / Bottom

I'm well aware that there are only two available UIView transitions, UIViewAnimationTransitionFlipFromLeft and UIViewAnimationTransitionFlipFromRight. I'm wondering if there is anyway that I can implement / emulate a UIViewAnimationTransitionFlipFromTop or UIViewAnimationTransitionFlipFromBottom. The only way I can think to do this is ...

iPhone SDK: UIWebView

I'm working on an app that uses a UIWebView to display its help files. The webView lives in it's own view, DocViewController...when its called the - (void)viewDidLoad { method uses [webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath: [[NSBundle mainBundle] pathForResource:docPage ofType:@"html"]is...

Native iPhone audio format

I've currently got my output audio on the iPhone setup as this : AudioStreamBasicDescription audioFormat; audioFormat.mSampleRate = 48000; audioFormat.mFormatID = kAudioFormatLinearPCM; audioFormat.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked; audioFormat.mFramesPerPacket = 1; audioFormat.mChannelsP...

Creating mask with CGImageMaskCreate is all black (iphone)

I'm trying to create an image mask that from a composite of two existing images. First I start with creating the composite which consists of a small image that is the masking image, and a larger image which is the same size as the background: UIImage * BaseTextureImage = [UIImage imageNamed:@"background.png"]; UIImage * MaskImage = [UI...

What causes a journal file to be created in SQLite?

I started noticing a weird behavior with my SQLite queries for my iPhone application. Whenever I execute an "INSERT" statement, a journal file is created beside my db file (the exact filename is "userdata.db-journal"). If I understand the docs correctly, this journal file is used by SQLite to be able to rollback in case the operation f...

Focus OnLoad="document.form_id.form_field_id.focus();" on the iPhone

Is there a way to focus on a text field on page load (on the iphone)? I tried: OnLoad="document.form_id.form_field_id.focus();" on the iPhone Simulator but it didnt work. Does anybody now why this doesnt work and if so is there a work around? ...

Watch functions value

Hello all, I'm trying to make a simple iphone app that has two buttons: Start and Stop. When you hit start it starts listening to the phone's microphone volume and makes label show how loud you're talking into the mic. When you hit stop, it stops listening. I found a great class called SCListener, but I'm not sure how to get it impleme...

How can I test my own application in ipod touch and iphone?

Hi, I have some iphone application that I created. I want to test my application in ipod touch. How can I test my application in ipod touch? Now I have no Apple id my own. If I open an id then how many applications can be tested with that id? If you have an available solution then please give me the answer and help me. ...