iphone

Change texture opacity in OpenGL

Hello! This is hopefully a simple question: I have an OpenGL texture and would like to be able to change its opacity, how do I do that? The texture already has an alpha channel and blending works fine, but I want to be able to decrease the opacity of the whole texture, to fade it into the background. I have fiddled with glBlendFunc, but ...

Image sequence animation with Core Animation

I'm currently using a UIImageView with an array of images to create a small looping animation sequence with about 20 images in there (at 320x480). Whilst this works okay for 20 - 30 images, any more and the app quits on the iphone. There is nothing else in my test app at the moment so I know it's just down to the animationImages sequence...

Delay with touch events

We have an app in AppStore Bust~A~Spook we had an issue with. When you tap the screen we use CALayer to find the position of all the views during their animation and if you hit one we start a die sequence. However, there is a noticeable delay, it appears as if the touches are buffered and we we receive the event to late. Is there a way...

How do I show the keyboard by default in UITextView?

I want to create a view that consists solely of a UITextView. When the view is first shown, by default, I'd like the keyboard to be visible and ready for text entry. This way, the user does not have to touch the UITextView first in order to begin editing. Is this possible? I see the class has a notification called UITextViewTextDidBegin...

AJAX on the iPhone?

I have a site that I've developed that makes decent use of Javascript, and minimal use of AJAX for a few things. The site worked fine on the iPhone until I added the function to create an HttpRequest handle at which point all Javascript on the iPhone now silently fails. So, I have a few questions. (1) It seems that AJAX does not work at...

Why does calling glMatrixMode(GL_PROJECTION) give me EXC_BAD_ACCESS in an iPhone app?

I have an iphone app where I call these three functions in appDidFinishLaunching: glMatrixMode(GL_PROJECTION); glOrthof(0, rect.size.width, 0, rect.size.height, -1, 1); glMatrixMode(GL_MODELVIEW); When stepping through with the debugger I get EXC BAD ACCESS when I execute the first line. Any ideas why this is happening? Btw I have a...

How do I query the iPhone's current IP address?

How do I query the iPhone's current IP address? ...

How do I set UITableViewCellSelectionStyle property to some custom color?

I am developing an iPhone application, in my table view I wanted custom color for Cell Selection Style, I read the UITableViewCell Class Reference but there are only three constants defined for Selection style (Blue, Gray, None). I saw one application that used a different color than those defined in the reference. How can we use a colo...

UIImage rounded corners

I try to get rounded corners on a UIImage, what I read so far, the easiest way is to use a mask images. For this I used code from TheElements iPhone Example and some image resize code I found. My problem is that resizedImage is always nil and I don't find the error... - (UIImage *)imageByScalingProportionallyToSize:(CGSize)targetSize { ...

Disabled input text color

Hi The simple HTML below displays differently in Firefox and WebKit-based browsers (I checked in Safari, Chrome and iPhone). In Firefox both border and text have the same color (#880000), but in Safari the text gets a bit lighter (as if it had some transparency applied to it). Can I somehow fix this (remove this transparency in Safa...

Can I close the iPhone browser using JavaScript

In the iPhone is there a way I can use JavaScript to close the browser and return to the home screen? After the last page a wizard I am calling out to another iPhone app (ex: maps) and I do NOT what the user to come back to the browser screen when they are done. My backup plan is to have a "Complete" page but that is not the best experie...

CATransition showing a single frame from the end of the transition before the animation starts

I am using some code which was originally taken from the Apple sample ViewTransitions to swap two views with each other. CATransition *animation = [CATransition animation]; [animation setDelegate:self]; [animation setType:kCATransitionFade]; [animation setDuration:0.3f]; [animation setTimingFunction:[CAMediaTimingFunction functionWithNa...

How do I round corners of myapp's icon

In simulator mode, myapp has an icon with round corners, but on real iPhone, the corners arn't rounded. ...

Parsing Unix/iPhone/Mac OS X version of PE headers

This is a little convoluted, but lets try: I'm integrating LUA scripting into my game engine, and I've done this in the past on win32 in an elegant way. On win32 all I did was to mark all of the functions I wanted to expose to LUA as export functions. Then, to integrate them into LUA, I'd parse the PE header of the executable, unmangle ...

iPhone OS Utility App - Flipside View and Main View communication

I am currently working on an iPhone 2.1 application. I am new to Objective C, coming from a Java background. My application has as a base the Utility Application template available in Xcode with the iPhone SDK. Currently I have some controls, such as an UISlider and text box, in the FlipsideView. The UISlider already has a method which ...

Cocoa Graphing/Plotting Framework that Works on iPhoneOS

Hello All, Looking at adding some data graphing to a new iPhone app in development (ala the Stocks app). I realize I could buckle down and do some Quartz drawing but I'm hoping that someone somewhere has a tip on a Cocoa graphing framework that works on iPhoneOS. Any suggestions? It would be a shame to re-invent the wheel if it's out ...

How do I make HTTP post request for getting JSON object in response for iPhone application?

I've a web service running on server which return data either in XML format or JSON format. I wanted to request a JSON format but using HTTP Post method. any help greatly appreciated. thanks in advance. ...

iPhone Web App Cache Persistence

How can I write an ASP.NET (C#) application that will render a page can be permanently cached on the iPhone when it is bookmarked as a "Homescreen Icon"? I have tried setting this on the code behind "Response.ExpiresAbsolute = DateTime.MaxValue;" but to no avail. The server code is still executed every time the home screen icon is laun...

Converting plist to binary plist

Apple strongly recommends using the binary plist format when reading large XML-based data sets into iPhone apps. Among their reasoning is the fact that XML parsing is very taxing on the iPhone. However, this requires that files residing on the remote web server be converted first. For frequently-changing content, it is not acceptable to...

How do you make the iPhone vibrate for arbitrary durations?

In the iPhone 2.x firmware, can you make the iPhone vibrate for durations other than the system-defined: AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); In jailbroken phones, you used to be able to use the MeCCA.framework to do this: http://pastie.org/94481 MeCCA_Vibrator *v = new MeCCA_Vibrator; v->activate(1); sleep(5); v->d...