Springboard-like scrolling/view switching with snapping on iOS - iphone

Is there a way in cocoa touch to implement view switching behavior like the one in iPhone's springboard? I mean horizontal scrolling with 'snap to view' animation (views are switched only after certain 'scrolling' threshold has been reached)

Look at the 'pagingEnabled' property on UIScrollView.

SpringBoard, App Store and Mobile Safari use a UIPageControl in conjunction with a UIScrollView to provide the little dots you see at the bottom of the screens, that you swipe across with that snap effect.
What views you want to swipe through depends on your application, though, as you're essentially swiping through a UIScrollView.

This isn't an answer, but I know it's possible. I have seen this behavior in "Twitter for iPhone" and asked myself the same question. If you use that app, check out what happens when you swipe the individual tweets to reveal more controls underneath.
This looks like it's part of TableCellView and some touch drag combination. As for the implementation of that... well, im too novice right now.

Related

XCode iOS - home screen style navigation

Sorry this is a pretty silly question, but I cannot think what the actual menu style is called. I'm trying to find a tutorial on how to create a instructions page that you flick through left and right to see more instructions. Basically exactly how the home screen works with dots representing how many screens there are and which screen the user is on, plus the same animation where if you flick left/right the next one slides on.
If anyone knows what these are commonly referred to as I can go look up some tutorials.
Thanks a lot,
Chris
This control is called a UIPageControl. And here's a link to a tutorial.
Use a UIScrollview with pagingEnabled.
add a UIPageControl to the view (wherever you want to see the dots).
Instruction pages should be added as subviews to the UIScrollView
Make sure to use UIScrollView and UIPageControl delegates to update the page in the pageControl.
If you need more info on how to implement this, search with keywords UIScrollView and UIPageControl

Using UIPageViewController and making the view look like it's flapping

I'm wondering if there's a way to animate the very first view in UIPageViewController so that it looks like the one of the page corners is flapping a little bit? As if a little breeze bristles the pages when you first arrive on this particular screen.
This to add some sort of UI affordance to indicate that screen can be swiped. The content we're displaying with UIPageViewController doesn't take up the entire screen like a book does but would like to make it more obvious to the user that they can use gestures to navigate horizontally.
Any suggestions would be helpful.
Have a look there: https://github.com/brow/leaves
This guy made a new ViewControllers / View class allowing this kind of animation.
Hope that helps.
How about overlaying an animated GIF in the corner of the page bobbing about a bit, which you can then dismiss as soon as the user interacts with the page? (I know GIFs are a pain to work with on iOS, but it's certainly possible.)

Map-like UI navigation on iOS

I'm experimenting with a UI concept where my views are laid out like a net and the user can swipe in different directions to navigate through the app. Here's a very rough mockup:
I understand I can use UISwipeGestureRecognizers to trigger animations, but I'd really like to move the views WITH the user's finger as they swipe, like Clear for iPhone does when you swipe up or down, or like Readability & Reeder do when you swipe back.
Any ideas how I might achieve this?
Have a look at the example for handling touch events directly, especially UIResponder's touches moved : https://developer.apple.com/library/ios/#samplecode/Touches/Introduction/Intro.html

How does Facebook iPhone app implement the pop-over window for notifications?

How does Facebook iPhone app (4.1) implement the pop-over window for notifications (see below for screenshot)? I thought this was only capable on the iPad. Is this a lookalike that they have custom built?
Check out this library which can implement pop over menus like facebook app: https://github.com/50pixels/FPPopover
I think it is far more complicated (and cleaner) than either of answers (guesses) so far. It is likely a completely separate view controller with it's own content view that is being added as a subview of the container view.
There are some libraries that so a similar thing, here is one for example:
https://github.com/KJoyner/SeaGlass/wiki/SGPopoverController-Documentation
http://www.facebook.com/note.php?note_id=107632999326583
https://github.com/chrismiles/CMPopTipView
My first guess would be that the "popover" is just a subview within the mainview.
First you create the subview, then hide it mySubView.hidden = TRUE; . When the user taps on the Globe button just "unhide" mySubView.hidden = FALSE; the subview with a nice 1 second animation (which will make it fade in).
I imagine that the edges with the rounded corners, subtle inner glow, and outer shadow are part of a resizable 9 part image. From there, it just about placing it on screen stretching it out and drawing the arrow at the appropriate location to line up with the bar button item.

webOS style view switching on iPhone app

I have been working with a iPhone app that I would like to have switch views like the Palm Pre does for multitasking. I know the usual way of switching views by using the black bar at the bottom of the app but the app I am working on does not lend itself to having a big black bar in the way (see attached picture #1).
I guess my question is, how do I shrink the current view (Current Location window) and show other views on the sides? (see attached picture #2) Then be able to swipe left and right to view other views. I have no idea how to do this and would be eternally grateful if someone could help me out with this.
http://www.threepixeldrift.com/images/deep-storage/webOScardapp1.jpg
http://www.threepixeldrift.com/images/deep-storage/webOScardapp2.jpg
The architecture should be similar to that of NavigationController: you have a number of ViewControllers each responsible for one card in your app. Then you have a 'super-controller' which controls these ViewControllers, by adding and removing their controlled views from the superview when necessary.
You'll need to use CoreAnimation and write the animations yourself.
i would use a UIScrollView and each card can be a small view that is shown by setting the contentoff set.