iphone

game programming for iphone

i want to know how many engine are available for game programming on iphone using sdk 2.2 for both 2d and 3d?? which one is best?? widely used?? how should i start?? books and tutorials online?? i am a beginner as iphone developer ...

How can I obtain clean alpha channel information from an PNG image in iPhone OS?

I have created an context like this (simplified): CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGContextRef context = CGBitmapContextCreate (bitmapData, pixWide, pixHeigh, 8, // bits per component bitmapBytesPerRow, colorSpace, kCGImageAlphaPremultipliedFirst); Now, when I try to extract the data for the fi...

How many bits per component do I have to specify for pngcrunch-optimized 24bit PNG files with alphatransparency?

CGBitmapContextCreate takes an parameter that's not very obvious to me: For example, for a 32-bit pixel format and an RGB color space, you would specify a value of 8 bits per component. I have created 24-bit PNG files with alphatransparency, and added them to Xcode. At compile time, Xcode optimizes those PNG tiles with pngcru...

memory issue in iphone?

I am using single UIImageView object, allocated memory it once. But changing the image names multiple times. The question is that, A) one UIImageView object,allocated once and never changed image name. e.g UIImageView *firstObj = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"blue.png"]]; B) another UIImageView object,allo...

How can i find out the accelerometer direction?

I doing a sound application on accelerometer.Its play different sound for movement by calculating accelerometer value.But how can i find the accelerometer direction that the user move x-axis plus or minus and y-axis plus or minus.How can i find this value on accelerometer. Please give some instruction or helping code or project. ...

iphone memory management

1.UIImageView *img1=[[UIImageView alloc]initwithImage:[UIImage imageNamed:@"1.png"]]; 2.UIImageView *img2=[[UIImageView alloc]initwithImage:[UIImage imageNamed:@"2.png"]]; a) img1.image = [UIImage imageNamed:@"2.png"]; b) [img1 setImage:img2]; which way utilizes minimum memory among a and b?why? if i need to do this multiple times...

How does the coordinate system in an CGContextRef look like?

I assume that the origin is on the bottom left, and the y-axis expands up, starting from 0. The x-axis expands to the right, starting from 0. I just ask because I get very weird results from my drawing code... want to make sure that I didn't get this part wrong. ...

UIView beginAnimations with subviews...

Hi, I have a nice and easy "zoom" animation for a view, which starts as a dot and animates up to full screen size: [UIView beginAnimations:nil context:NULL]; [UIView setAnimationBeginsFromCurrentState:YES]; [UIView setAnimationDuration:1.0]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; ...

Add Resources to an Xcode Project Recursively with Applescript

Is it possible to add a folder to an Xcode project as a group with Applescript, recursively adding everything below it as if it were dragged to the Groups & Files list? ...

Getting the visible rect of an UIScrollView's content

How can I go about finding out the rect (CGRect) of the content of a displayed view that is actually visible on screen. myScrollView.bounds The code above works when there's no zooming, but as soon as you allow zooming, it breaks at zoom scales other than 1. To clarify, I want a CGRect that contains the visible area of the scroll vie...

Currency Mask

I need to create a currency mask. I did lines of command and it's works fine, but when i set the value in textfield, occurred infinit loop. I monitoring the textfield with Editing Changed behavior, to catch each caracter that the user set, but when i try to change the text value, the infinity loop happens. :( Somebody have a simple code...

Getting first three digits from int/float

I'd like to get the first three digits from large floats or integers and on some insert a decimal. For example: KB ---------- 32589 >> 325 43266 >> 432 MB ---------- 1234599 >> 1.23 3422847 >> 3.42 For the particular number, I will have the "KB" and "MB" strings. This will let me know if the decimal is required, as in "MB" examples...

Does the iPhone get a fixed IP address when accessing the web via the mobile phone network?

I’m guessing not, but I wondered if anyone had any experience. I imagine it could vary depending on the mobile network. I’ll do some testing here on O2 in the UK and update the post. ...

Using a custom image for a UITableViewCell's accessoryView and having it respond to UITableViewDelegate

Hi everyone, I'm using a custom drawn UITableViewCell, including the same for the cell's accessoryView. My setup for the accessoryView happens by the way of something like this: UIImage *accessoryImage = [UIImage imageNamed:@"accessoryDisclosure.png"]; UIImageView *accImageView = [[UIImageView alloc] initWithImage:accessoryImage]; accI...

iPhone application architectures

Hi, all! Can you anyone point me to specific books or maybe give me a quick overview of how architectures of data-driven iPhone applications look like? For example, let's say you're implementing an application that searches online shopping sites and gives you recommendations..etc. Is it a common pattern to establish a hosted back-end of...

Change pitch of audio during playback on iPhone

What is the best way to accomplish this? From what I have read so far, it seems you have to setup IO Remote (which is a pain itself). Do you need to do a FFT? Are there any examples out there? Can I just speed up / slow down playback? Thanks ...

How can a C# programmer build software for iPhone?

What should I learn to develop software for iPhone? Thanks ...

Tell me if this iphone app will work

I'm looking at adding iphone support to an application in the simplest way possible. I don't have any experience writing code for the iphone, so I'm trying to keep it very simple. Here's my current concept of what the application will do: 1) Copy some data from the PC to the iphone - this would probably be sent by an application running...

Cocoa: Why is my table view blank?

Why is my table view blank? It was fine until I added "initWithStyle" Here is what it looks like: And here is what my code looks like: Here is my .h: #import <UIKit/UIKit.h> @interface TableViewController : UITableViewController { NSMutableArray *jokes; IBOutlet UITableView *jokeTableView; } @property (nonatomic, retain) NSM...

iPhone, Map, Clickable non-rectangular areas

Anyone have any ideas on how I could implement the following on the iPhone? We have a map of the US, and it has different regions (climate regions, I believe) that are different colors. They are not rectangular, and don't follow state or zip or county or any other defined lines. So, our areas a very round-y and not even necessarily co...