iphone

is it possible to deep link to youtube videos on the iphone?

on the web you can deep link to youtube videos like this: http://www.youtube.com/v/wiTSbmxssBQ&amp&start=20 is there a way to make this work on the iphone? thanks! ...

Quartz Composer in iPhone UIView

Hi everyone, I am trying to embed a Quartz Composer document in an iPhone app. I know Quartz Composer support was added in iPhone OS 3.1 (at least, that's what Wikipedia says) but I can't find any good resources on how to do this. Do I use CGContext? Or are there more friendly ways to add a Quartz Composer composition? Thanks! ...

Getting MAX_INT from NSDateComponents

I'm trying to write my first iPhone app, and I'm using a date picker object for the user to enter their date of birth. Part of my app requires the year in int format. I've added the code as below. What's odd is that 'month' gets the right value. But day and year seem to be stuck at MAX_INT (2147483647). Can anyone tell me what I'm doing ...

OpenGL ES 2.0 FBO creation goes wrong with unknown error

I've been struggling with this for a while now, and this code crashes with, to me, unknown reasons. I'm creating an FBO, binding a texture, and then the very first glDrawArrays() crashes with a "EXC_BAD_ACCESS" on my iPhone Simulator. Here's the code I use to create the FBO (and bind texture and...) glGenFramebuffers(1, &lastFrameBuffe...

Interchanging presentModalViewController and pushViewController

I am using a sample ViewController that is displayed in the sample program as a presentModalViewController. However, I want to use pushViewController on the UIViewController instead. The problem is that when I switch to pushViewController, the ViewController no displays properly. Functions in the ViewController are called, but I don...

Dynamically create hierachical tableview from file structure

Hi, I have a directory structure of directories and files that I want to render as a tableview in an iphone app. I'd rather have this generated dynamically rather than have to maintain a XML PLIST or whatever. i.e. replicate the Explorer functionality in windows where a user can traverse the structure and then select bundled image fil...

what is the different between window based project and view based project in iPhone?

They seems pretty similar.What is the different? If I choose wrong, can I change it after I start coding? ...

Troubleshooting FORM POST problems

I'm using the following code to submit to a WCF service. I keep getting an error that the key is invalid. I have a webpage on the same server that I submit the same data (but different key) using a FORM POST. It works fine that way. I put the URL below all in a URL (including valid key from server webpage) and get the key is invalid ...

An important question on iPhone file writing

I use the NSHomeDirectory() function to get the app's home folder, and write to the Documents directory within that. I'm curious, though, what happens when the user downloads an update for the app in the appstore? Will it all be deleted? When I delete the app on the device, then reinstall it, its wiped out. So, I'm curious to know wh...

How to change a UIBarButtonItem in a UINavigationBar

I'm trying to set up a list of items that can be edited. I have a main view, with a UINavigationBar at the top and a UITableView directly under it. I'd like to have my "edit" button change to a "done" button on click, but I can't figure out how to do it. If I could do it in the code (not it interface builder), I could just replace it, b...

how can i load a display in tableview header section iphone ?

how can i display a image in tableview header section iphone ? ...

Optimal UI For Single Zip Code Entry on iPhone

I need to prompt the user to enter his/her zip code at certain times in my iPhone application. I cannot store it or get it from the user's current location. What is the optimal input method? I started with a 5 wheel picker. This seemed like a bad direction, so I opted for a PIN-like entry screen. My implepentation is about the same as ...

When we should use NSThreads in a cocoa Touch ?

I am writing a small game by using cocos2d. It is a shooting game. Player on one side and enemy on other side. To run the both actions of player shooting and enemy shooting do we should use threads ? Or can we do without using them. At present I am not using threads. But I can manage to do both actions of player and enemy at same time. S...

Why we used double and triple pointer in objective-C or C language?

Hi, I confused when i want to take single pointer and when should i take double pointer? In following structure what exactly did? struct objc_class { Class isa; Class super_class; const char *name; long version; long info; long instance_size; struct objc_ivar_list *ivars; struct objc_method_list **method...

Changing color of the titlebar, background and text of MFMailComposeViewController

I am sending email from my iPhone application. Everything working fine, but I want to change the color of the title bar that appears from blue to black and the background color from white to black. Also, all the text to white color. What should I do? Anyone please help! I used the below code: - (IBAction)sendMail{ MFMailCompose...

How to play an audio file ONLY while user is shaking iPhone?

I've read a number of posts regarding how to detect shakes but I'm not sure: What is currently the best way to detect shakes? and - How to play an audio file ONLY while the user is shaking the iPhone? Anyone have an advice, examples/tutorials or sample code? Thanks ...

how to implement setAutoresizesSubviews in UITableView?

i have created dynamic UILabel in UITableViewCell.Now i move device in landscap mode then tableview is display properly but lable is not move in landscap mode.How to move in landscap mode ...

Objective-C : Member variable is losing reference between method calls.

Hello, I've been having with an objective-c class which appears to be losing its pointer reference between methods of the same class. In the MyTableViewController.h file, I declare: @interface SettingsTableViewController : UITableViewController <UITextFieldDelegate>{ OCRAppDelegate *delegate; } MyTableViewController.m file - (i...

how to create Map Markers on UIImageView?

Hi, I am using static images in Imageview to show some area. I want to place pin markers that we can create on google maps. What is a good way to implement this? Thanks in advance. ...

iPhone clip image with path

I would like to clip an image with path. In the book Programming with Quartz there is an example on how to draw a circle clipped by a rectangular path (p.37), and there is also a chapter on image masking with existing image as stencil (Ch.10). But I'm still not sure about how to clip an existing image using path. Is there any example or ...