iOS: Keep an app running like a service

Basically, there is no such thing as a service type app or functionality in iOS. Even the “background” apps (UIBackgroundMode) cannot run entirely free and without restrictions like a service or daemon etc. on other OSs can. Here’s the situation regarding background execution and notifications and timers etc. 1) An app cannot execute in the … Read more

iPad doesn’t trigger resize event going from vertical to horizontal?

If I understood you correctly, you want to do something when the user tilts the iPad. Here you go: window.onorientationchange = function(){ var orientation = window.orientation; // Look at the value of window.orientation: if (orientation === 0){ // iPad is in Portrait mode. } else if (orientation === 90){ // iPad is in Landscape mode. … Read more

ipad web application: How do I prevent the keyboard from popping up on jquery datepicker

I used a slightly modified version of Rob Osborne’s solution and it successfully prevented the keyboard from popping up on the iPad and iPhone. $(“.datePicker”).datepicker({ showOn: ‘button’, onClose: function(dateText, inst) { $(this).attr(“disabled”, false); }, beforeShow: function(input, inst) { $(this).attr(“disabled”, true); } });

jQuery click event not working in mobile browsers

I know this is a resolved old topic, but I just answered a similar question, and though my answer could help someone else as it covers other solution options: Click events work a little differently on touch enabled devices. There is no mouse, so technically there is no click. According to this article – http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html … Read more

iPad: Iterate over every cell in a UITableView?

for (int section = 0; section < [tableView numberOfSections]; section++) { for (int row = 0; row < [tableView numberOfRowsInSection:section]; row++) { NSIndexPath* cellPath = [NSIndexPath indexPathForRow:row inSection:section]; UITableViewCell* cell = [tableView cellForRowAtIndexPath:cellPath]; //do stuff with ‘cell’ } }

How to correctly present a popover from a UITableViewCell with UIPopoverArrowDirectionRight or UIPopoverArrowDirectionLeft

You’re getting the frame from the cell via the rectForRowAtIndexPath method. This is correct. However the tableview is most likely a subview of a larger iPad view so when the popover gets the coordinates it thinks they’re in the larger view. This is why the popover appears in the wrong place. Example, the CGRect for … Read more