iphone

Pattern for wrapping an Asynchronous JavaScript function to make it synchronous

I'm working with a JavaScript API where most of the functions are asynchronous. The API is the WebKit JavaScript Database API which is a binding to a subset of functionality to manipulate SQLite3 databases. I understand the design decision to make things async as to not block and provide a responsive user interface. In my situation I ...

Why do images for textures on the iPhone need to have power-of-two dimensions?

I'm trying to solve this flickering problem on the iphone (open gl es game). I have a few images that don't have pow-of-2 dimensions. I'm going to replace them with images with appropriate dimensions... but why do the dimensions need to be powers of two? ...

UUID mismatch detected with the loaded library

I get a "UUID mismatch" warning at the console when I try to build and run my app on my iPhone. warning: UUID mismatch detected with the loaded library - on disk is: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.1.sdk/usr/lib/liblockdown.dylib =uuid-mismatch-with-loaded-file,file="/Developer/Platforms/iPhoneOS...

Right way to implement TouchesMoved ?

I have a custom UIView that generates a set of subviews and display them in rows and columns like tiles. What I am trying to achieve is to allow the user to touch the screen and as the finger move, the tiles beneath it disappears. The code below is the custom UIView that contains the tiles: - (id)initWithFrame:(CGRect)frame { if ...

Available iPhone Web Application JavaScript UI Library/Frameworks

I'm starting a web application that will target Mobile Safari on iPhone/iPod Touch. I'm evaluating the available client-side JavaScript/CSS libraries/frameworks that are currently out there. These are the ones I'm currenlty aware of: iUI CiUI UiUIKit WebApp.Net iWebKit Apple's Dashcode Application - not really a standalone library/fr...

How do you set the hardware volume in an iPhone app?

Some iPhone applications, such as Pandora seem to directly manipulate the hardware volume and respond to physical volume button. How is this done? AudioSessionServices allows you to get the current hardware output volume with the kAudioSessionProperty_CurrentHardwareOutputVolume property, but it is (allegedly) read-only. ...

How do I send an image via email through the built-in iPhone Mail app?

I would like to provide my users the ability to send an image/picture (displayed through a UIImageView in the app) to their friends via email using the built-in Mail app. In a way, I want a very similar user experience to the way the Photos app does this. User clicks on a button, the image/picture is copied onto a new "compose" mail win...

How to make a custom drawn UITableViewCell resize properly?

For performance reasons, I draw the strings for my UITableViewCell in a custom view that overrides its drawRect method to draw strings directly in the view rectangle using NSString:drawInRect. This is similar to Apple's TableViewSuite Example 5-CustomTableViewCell. However, when I invoke setEditing on the cell to bring up the delete but...

UIView scale to 0 using CGAffineTransformMakeScale

Is it possible to scale a UIView down to 0 (width and height is 0) using CGAffineTransformMakeScale? view.transform = CGAffineTransformMakeScale(0.0f, 0.0f); Why would this throw an error of "<Error>: CGAffineTransformInvert: singular matrix." ? Update: There is another way of scaling down a UIView to 0 [UIView beginAnimations:n...

What's the best way to test an iPhone game for iPod Touch?

I've developed a game for the iPhone... on my iPhone. When I submitted it to the store I marked it as "iPhone only". Now I'm getting emails asking "Why not iPod touch?". The game doesn't use any iPhone only features btw. So... I'd like to test it on an actual iPod Touch to be sure it works. Is this really necessary? If so do devel...

What do I need to test on the iPod touch (besides the actual device) ?

I've tested my iPhone app on the iPhone. Now I want to test it on the iPod touch. Assuming I have an iPod touch what else do I need? I just want to make sure all the certificates and stuff that I used for the iPhone will work for the iPod touch too. ...

Large scrolling background in OpenGL ES

Hello! I am working on a 2D scrolling game for iPhone. I have a large image background, say 480×6000 pixels, of only a part is visible (exactly one screen’s worth, 480×320 pixels). What is the best way to get such a background on the screen? Currently I have the background split into several textures (to get around the maximum texture s...

Is there a way to place a pin into the google maps iphone app using openURL?

I would like to create an iPhone app that can open the google maps app and place a pin on the map. I have the exact location of the pin, specified by its longitude and latitude. I also have a name for the pin e.g. 'location 1' that should be displayed along with the pin. I know that UIApplication:openURL can be used for this but I don'...

stitch picture in iphone

Hi, I want to stitch 2 pieces of png side by side. In Cocoa, I would use [NSImage initWithSize], and then just drawInRect. But UIImage don't have initWithSize class, how would I do this now? ...

loading custom framework in iphone

Hi, I'm trying to use an external framework for UPnP browsing on the iPhone. The framework works perfectly on the Mac, But when I copy it to the iPhone app, it wouldn't run even if there's no code using the framework yet. It gives weird error that I can't understand. [Session started at 2008-10-20 15:32:34 +0200.] objc[2701]: Class ...

How to change Text Rotation Axis

I am using CGContextShowText to display text, but when rotation using CGAffineTransformation, the rotation axis is located at the left, not at the center of the drawn text, the code I am using is this: CGContextSaveGState(context); CGContextSelectFont(context, "Helvetica", 20, kCGEncodingMacRoman); CGContextSetCharacterSpacing (context,...

How do I make iPhone SpringBoard show two or more icons for one application bundle?

It seems like Info.plist file has an ability to declare different roles for the same application bundle through the UIRoleInfo key. SpringBoard can recognize these roles after installing an app and may display separate icons for each application role. For instance, iPhone shows MobileSlideShow.app as 2 different programs: Photos and Cam...

Cross-Platform Way of Creating Safari Webarchives

I've been searching around and haven't found any reference to tools that can create Safari's webarchive format. Does anyone have pointers to code for creating this format, or at least a format reference documentation? Ideally I'd like to build a tool that takes a directory and splits out a webarchive, for loading into a iPhone. ...

Ruby on iPhone

Hi I'm looking into iPhone development, and objective-c is not be my preferred language. As far as I can see at this moment Ruby cannot be used to talk to Cocoa-touch at the moment on the iPhone. So my question is, am I wrong? Can I use Ruby on the iPhone to develop Cocoa-touch applications. And what is the future looking like for Ruby ...

How to share custom data between iPhone applications?

If I make two iPhone applications, how can/should I share custom data (not contacts and stuff like that) among them? Thanks! ...