Animate change of view controllers without using navigation controller stack, subviews or modal controllers?

EDIT: New answer that works in any orientation. The original answer only works when the interface is in portrait orientation. This is b/c view transition animations that replace a view w/ a different view must occur with views at least a level below the first view added to the window (e.g. window.rootViewController.view.anotherView). I’ve implemented a … Read more

Xcode doesn’t see my iOS device but iTunes does

Even though this one does not address the specific problem of the OP, it might be a solution for other people finding this question. In some circumstances, Xcode will not recognise (won’t even see) a connected device that was previously recognised, even though there were no changes in Mac OS/iOS/Xcode versions. This seems to happen … Read more

ipad safari: disable scrolling, and bounce effect?

This answer is no longer applicable, unless you are developing for a very old iOS device… Please see other solutions 2011 answer: For a web/html app running inside iOS Safari you want something like document.ontouchmove = function(event){ event.preventDefault(); } For iOS 5 you may want to take the following into account: document.ontouchmove and scrolling on … Read more

UICollectionView current visible cell index

indexPathsForVisibleItems might work for most situations, but sometimes it returns an array with more than one index path and it can be tricky figuring out the one you want. In those situations, you can do something like this: CGRect visibleRect = (CGRect){.origin = self.collectionView.contentOffset, .size = self.collectionView.bounds.size}; CGPoint visiblePoint = CGPointMake(CGRectGetMidX(visibleRect), CGRectGetMidY(visibleRect)); NSIndexPath *visibleIndexPath = … Read more

What size should apple-touch-icon.png be for iPad and iPhone?

Updated list December 2019, iOS13 One icon for iOS 180×180 px and one for android 192×192 px (declared in site.webmanifest). <link rel=”apple-touch-icon” sizes=”180×180″ href=”https://stackoverflow.com/apple-touch-icon.png”> <link rel=”manifest” href=”http://stackoverflow.com/site.webmanifest”> #### site.webmanifest { “name”: “”, “short_name”: “”, “icons”: [ { “src”: “/android-chrome-192×192.png”, “sizes”: “192×192”, “type”: “image/png” } ], “display”: “standalone” } Deprecated list October 2017, iOS11 List for … Read more

jQuery get the location of an element relative to window

Initially, Grab the .offset position of the element and calculate its relative position with respect to window Refer : 1. offset 2. scroll 3. scrollTop You can give it a try at this fiddle Following few lines of code explains how this can be solved when .scroll event is performed, we calculate the relative position … Read more

position: fixed doesn’t work on iPad and iPhone

A lot of mobile browsers deliberately do not support position:fixed; on the grounds that fixed elements could get in the way on a small screen. The Quirksmode.org site has a very good blog post that explains the problem: http://www.quirksmode.org/blog/archives/2010/12/the_fifth_posit.html Also see this page for a compatibility chart showing which mobile browsers support position:fixed;: http://www.quirksmode.org/m/css.html (but … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)