Tag: ipad

window.onbeforeunload not working on the iPad?

Does anyone know if the onbeforeunload event is supported on the iPad and/or if there’s a different way to use it? I’ve tried pretty much everything, and it seems like the onbeforeunload event is never triggered on the iPad (Safari browser). Specifically, this is what I’ve tried: window.onbeforeunload = function(event) { event.returnValue = ‘test’; } […]

iPad Safari – Make keyboard disappear

In iPad Safari browser, when I change focus from a textbox to a dropdown, the keyboard still remains… Is there some way (maybe with Javascript) I can hide the keyboard when user blurs from the textbox? Indirectly speaking, I am looking for a equivalent of (but in Mobile Safari) [tempTextField resignFirstResponder];

convert UIImage to NSData

I am using this code in my app which will help me to send a image. However, I have an image view with an image. I have no file in appbundle but have the image in my side. How can I change the below code ? Can anyone tell me how can I convert myimage […]

iPhone: How to draw line between two points on MapKit?

I have Latitude and Longitude of two points and Want to Draw line between these two points with Pin on MapKit. I have googled but Could not find some suitable solution because the one I found was drawing overlay with array of Data points but I do not have any array of points between these […]

How to support both iPad and iPhone retina graphics in universal apps

Apple presented new iPad that support retina graphics. I saw this link retina graphic in apple apps. As you can see apple just use “@2x” suffix for retina iPad display. I have an universal app. So how to support retina in new iPad and iPhone? Will iPad retina use suffix “@2x” similar to iPad?

How to install cocoa pods?

I referred too many links and tried, but had no success. If any one has an idea then please please share with me. I read cocoa pods documents and many times tried to install but always failed because of the starting steps. I found one error whereby I can’t install gems first. Can anyone give […]

How to register a custom app opening URL scheme with Xcode 4?

Xcode4 is asking for a huge number of arguments just to make this simple thing possible: NSString *stringURL = @”twitterriffic://”; NSURL *url = [NSURL URLWithString:stringURL]; [[UIApplication sharedApplication] openURL:url]; What are all these properties for? Why an image? Must I repeat the app identifier here? What role to choose if I want anyone to be able […]

iPad Safari scrolling causes HTML elements to disappear and reappear with a delay

I’m currently developing a web app using html5 and jQuery for iPad Safari. I’m running into a problem wherein large scroll areas cause the elements that are offscreen to appear after a delay when I scroll down to them. What I mean by that is, if I have a row of images (or even a […]

Difference between vs init]

can someone tell me the difference in declare an mutable array with: NSMutableArray *array = [NSMutableArray array]; and NSMutableArray *array = [[NSMutableArray alloc] init]; Because in the beginning I was declaring all my arrays with alloc, and if in the end of a certain function I returned the array created with alloc, I had to […]

instruments with iOS: Why does Memory Monitor disagree with Allocations?

As can been seen in this screen shot from instruments, Allocations thinks my application (Ongo) is only using 7.55 MBs of memory, while Memory Monitor says 53.30. Further more the free system memory has little to no correlation to the amount of memory that the app is using. Does anyone know why there is such […]