Workaround for history animation in Safari for OS X Lion? - safari

In Safari for OS X Lion, when you use the swipe gesture to navigate forward or backward in history, the window animates as though you were moving through physical pages. The problem with this behavior is that many apps already listen for changes in the history state, and respond appropriately -- either when the hash is changed, or when HTML5 pushState is used.
A perfect example is GitHub, when navigating in and out of folders -- https://github.com/johndyer/mediaelement, for example. If you click on a folder, then swipe to the previous page, the end state "snapshot" is shown, and then animated to again from the beginning state, which not only is confusing, but nullifies the informational value of the animation.
Today is my first day using Lion, but I'm curious if any other web devs have encountered this issue, and whether you've found a workaround?

Sadly it seems there's no documentation about this in the Safari Developer Library.
But there is an (ugly) workaround to disable them on your client machine at least.
In the Trackpad settings, if you set Swipe between pages to Swipe with two or three fingers you can use two fingers to do fancy animations, and three fingers if you don't
like them. But it feels really weird, especially because the three finger swipe is in the
wrong direction.

Maybe use Modernizr to sniff out Safari and rely on Safari's native animation instead of your code's animation? I know this doesn't help with consistency, but lets face it... this is a browser we are talking about!

I would suggest that you go into settings and navigate to gestures. Here, you will see a little dropdown bar that contains the options. Select either of the other two options to fix this. Hope I could help!

Related

JetBrains IDEs scrolling on touchscreen

I'm having a problem scrolling in all the JetBrains IDEs (PyCharm, PhpStorm) using touch screen. I have a Dell XPS 15 with a touchscreen.
When I try to scroll it just selects code. I have tried in regular Notepad and Notepad++ and there works as expected.
Has anyone else experienced it? Is there any solution to this? It would be really great to scroll through the code using touchscreen.
I have found temporary solution by installing plugin Code glance (https://plugins.jetbrains.com/plugin/7275). The plugin provides a sidebar with code map, which is similar to the one from Sublime. In the sidebar it is possible to navigate through code. It is not ideal but it's better than nothing.
Yes, I was having the same problem. And luckily I got a gesture to scroll using two fingers:
Scroll up: Tap and hold using one finger and swipe away[from close to distant of the first finger] using another finger. Swiping away from each other also works.
Scroll Down: Tap and hold using one finger and swipe in[from distant to close of the first finger] using another finger. Swiping close to each other also works.

Famo.us browser scroll emulation does not feel natural

I am creating a site in pure Famo.us, I wanted to have 1 page with sections where the user has possibility either click on links and scroll to anchors or scroll sequentially to get to sections. I used initially famo.us scrollview, but its behavior was not was not similar to browser scroll - I tried many options. I implemented my own scroll with Scrollsync, modifier and transition but it still does not feel similar to browser scroll. But the main problem that on Laptop and Desktop PC - I need to set different scrollscale to function normally. Here is the app:
https://svet15.herokuapp.com/
Can anybody give a direction to solve the problem with syncscale and maybe how to make scroll similar to browser native scroll.
P.S. I keep mobile view separately from desktop, so window.width should be more than 500 to see the desktop view where I have this problem. Thank you in advance!

Customizing iPhone app taskbar

I thought that it was not allowed to customize the taskbar on the iPhone. However, I noticed this app called iHandy Tip Calculator which replaces the battery icon with a fast switch icon, that pops up a view as shown. How is this allowed, and if so how can I be doing something different?
If you run the app on an iPad, you'll see, how they do it: they are overlaying the normal status bar. Also note, that the screenshots in the app store don't show this feature. I assume, they were fearing to get rejected and disabled the overlay for the screenshots.
Apps from this developer iHandy incorporate this into the status bar, but I've never seen another company do this. I am surprised that the status bar is able to be modified in this way in any event.
My question on apple.stackexchange is posted over here:
https://apple.stackexchange.com/questions/71969/what-is-the-meaning-of-this-status-bar-icon
It is possible to create your own statusbar and "simulate" the network status and battery life etc in a 'full-screen' app. But apple doesn't allow it, but this might be one that 'slipped through' just like Gaz_Edge said.
You are correct. You are not suppose to be able to modify the 'springboard'. Apple normally refuse apps that do anything that modifies it. Maybe this one slipped through the net?
I just downloaded the latest version of iHandy Level (version 1.62.0) on an iPhone 5 running iOS 6 but don't see the icon (it's within the app rather than in the status bar). (And the status bar is hidden.)
I was curious to see if they actually hid the status bar and created their own custom status bar. If that was the case, you'd be able to tell because when you swipe down from the top for notification center, it would first show a little tab and then you'd have to swipe again to pull down the menu.
Guessing maybe they removed this functionality at Apple's request.
If anyone still has a version that shows it, please let us know if it shows the tab when you swipe for notification center. If not, they likely found some private api to allow them to replace the battery icon (which would be interesting).

How to make somethinge like the iPad/iPhone main menu?

No need to say I'm an absolute beginner in Xcode, after you read my question:
In my app I'm putting together, as menu, 5 pics, fulfilling the whole screen in portrait. I'm using UISwipeGestureRecognizer for each view so the user will be able to go left and right through all of them. My problem is that the transition goes very dry and instantaneous, without any animation. So, my question is what should I use, to obtain this cool effect of the views, snapping to the screen boundaries, when the user takes out his finger?
You know, just like the main menu of the iPad, when you go through the pages with your apps and before swiping a page all the way to the end and let go, the page snaps with a little jerky adjustment.
I,ve looked everywhere and could not find anything on that on the net.
Thank you very much in advance for your answers
Ioan
Check out the three20 library. It does this and much more. Specifically look at the launcher feature.
You'll have to add in your own animations and effects yourself if you aren't using a 3rd party utility (I don't know of one that does what you want).
For instance, if you wanted your icons to center on the screen smoothly, maybe setup a timer that triggers every 100 milliseconds for .5 seconds so that after the .5 seconds are up, the icons are centered.
As soon as the user lifts their finger after a swipe take the center position, how far away the icons are from the center, and divide by 5 and move by that much each timer activation.
That's a simple example, but I think you get the idea.

How to create a Controller to simulate the Springboard feature of the iPhone within your own application

I am trying to design a feature in my application for the iPhone that simulates the Springboard feature (Main menu of the iPhone that allows you to view more apps), or the way Weather application works that allows you to flip between views.
Does anyone have any samples of this how I would go about doing this. It's seems very trivial but I am wondering if I am missing something that is already available either as an Apple example or someone who did a tutorial on this.
The image below show how the user would use it.
alt text http://www.agilitesoftware.com/SpringboardExample.png
As they slide their finger to the right (or left) the other image would begin to show up. And it would animate smoothly. The faster you swiped your finger the faster it would move to the next view.
Update: The other feature is that it should mimic the same feel when you slide your hand across the display that is snaps to the current view into place. It should not keep sliding across if there is more than 1 view to the direction you swiping your finger.
I've seen other applications use this so that is why I am asking.
This is accomplished using the UIScrollView with the pagingEnabled property set to true. Just add each of your views, adjust the contentSize, and it will automatically "page" to the width of the screen across the content.
There is a sample app (with code) with exactly this functionality on the iPhone developer site on Apple.com (I believe it's called "PageControl".) - I'd suggest checking it out.
d.
I'm writing an app that uses a similar UI. As NilObject recommended, we're using a UIScrollView with pagingEnabled=YES.
You may also be interested in this example code involving just two child views. I'm trying it out now; it's an interesting technique but I've had to write some additional special-casing code for some odd situations that resulted.
There's also another question on this site that asks about creating a grid of icons like the home screen.
I would check out Joe Hewitt's code from the Three20 project for this. It provides a nice interface and further refinement of the UIScrollView implemented as TTScrollView and TTScrollViewDelegate, TTScrollViewDataSource.