I would like to customize the animation to display a uipopovercontroller so that it can slide in from right to left when it appears. I basically would like to simulate the menu you can see in Flipboard. Is there a way to customize the animation without having to write a popovercontroller? It seems that the default behavior has the slide in functionality but it is too fast to see it happening. I didn't find any property where i can set a transition style.
Any help would be greatly appreciated!
I'm afraid that isn't a popover that the Flipboard app is using. It's most likely another UIView or UIViewController layered on top of the current view. Much like the 'About' menu in Angry Birds. Animating UIPopovers is also not going to be very easy, as they were never built for customization (or to be leak proof, or to even be very good in the first place). My advice, create your own. (I love github, so so much).
Related
Does anyone know how CNN is doing their top pull down menu?
It looks like a UITableView that is called with a touch drag event but wasn't sure. Googled various keywords but was not able to turn anything up. Just looking for some guidance on how to replicate this behavior.
I've no idea how it's actually done, but I know how I would do it: any view can sit completely or partially offscreen and be dragged onscreen by the user in the usual ways (e.g. a swipe or pan gesture recognizer). There's nothing special about that.
I guess they are doing something like https://github.com/mikefrederick/MFSideMenu
You have to customize "MFSideMenu" a lot though. If you dont want to show this menu on every view you need to disable UIGestureRecognizerDelegate on that view.
There is also something like https://www.cocoacontrols.com/controls/pullableview but you may need to add UIGestureRecognizer to this class.
So I've implemented an iPad application it has a UISplitView implemented. i'm using the slide gesture to show the popover controller instead of a bar button. the problem is that by default the popover slides in from left I want the slider to move in from the right. I've tried finding a solution to this but couldn't find anything yet so I thought i better ask this myself and see if its even possible.
I know this exists: http://mattgemmell.com/2010/07/31/mgsplitviewcontroller-for-ipad/
but im not too keen on using a 3rd party library.
If you know any possible solution or a work around please let me know. Thanks in advance.
Guess theres no other way but to use a custom made uisplitview... In the end i had to re-design my whole app and this time I had to create a custom UISplitViewController from a scratch.
Apple should be a little more flexible with their publically
Does anyone knows how to build a flip animation like the flipboard app?
Thanks
If you mean the page flip transition, have a look at the OpenGL transition class I wrote.
https://github.com/epatel/EPGLTransitionView
I added a couple of example transitions and one of them are a "page flip" transition.
Have a look at FlipView, it tries to replicate Flipboard app for iPad
Some of the features implemented are:
Multiple flip (just click on last pagination if u r at first or second for multi-flip).
Views arrangement if orientation changed like Flipboard
Selection of random layout
Hopefully this link is of some help to you :D
I remember from watching an interview with the CEO saying that all the flipping boards and the animations are done using HTML5! I can not find it now sorry :(
I managed to find the non-broken link to FlipView example on github: https://github.com/Reefaq/FlipView
Hope it helps
I've been looking for the same for weeks. If you use the 'origami' transition in the ipad's photo app, you'll see that it has a very similar flipboard effect. Though someone with much more programming chops can probably give you the specifics, I think they use core animation. In it, you can define the anchor point and basically transform the uiview along the z axis.
So, in an iPhone app I am working on, I've decided that the best way to display all the contents to the user is to have the top part of the screen show some information, and the bottom of the screen show different information. However, the bottom part will change sometimes, so I was working on implementing that.
Another app that does this is the MTGLife app, here are some pictures:
http://picasaweb.google.com/lh/photo/HILMaJPnbLxP6hQRkn_6XA?feat=directlink
http://picasaweb.google.com/lh/photo/d5wpS8x_aRyAEOBpYYIxwQ?feat=directlink
http://picasaweb.google.com/lh/photo/RW-BQfqx-VytRim3BxeRZQ?feat=directlink
You see that upon hitting a button, the picker switches over and displays the log. Hitting the same button switches them back, with a pretty animation. I would like to do the same thing in my application. I'm not sure the best way to go about it though...
I was thinking that I would make 2 UIViews, and then would simply flip between them, but I want to get some opinions first on how to do this, and then a push in the right direction.
Thank you!
The 2 UIViews is a good approach. By using the UIView animations functions, you can switch between the Log and the Picker with the desired transition.
In the UICatalog sample application (see TransitionViewController), there an example on how to animation two subviews
When I've learned that I have to write some code to make the iphone keyboard go away. I was quite surprised. I was surprised even more when it become apperent that it is just the top of the iceberg.
What are the expected UI behaviors that aren't provided by system OOTB?
Is the list below complete?
The expected UI behaviors:
Focusing next text field when [done] is hit
Hiding the keyboard when background is hit
Using Touch Up Inside to fire a button action. (To give user opportunity to change his/her mind)
Supporting the screen rotation.
Some of that is silly, but some of it has uses as well.
Focusing next text field when [done] is hit
Which field is "next"? If you have a large form with fields both next to and above/below each other, next might not be so obvious. Even if they are in some linear layout, the iPhone would have to work to figure out which one is next. Do you want to wrap around at the end of the form, or dismiss the keyboard, or submit the form?
Hiding the keyboard when background is hit
I mostly agree with you here, though there are a few cases where this is useless. For example, adding a new phone number in the contact app.
Using Touch Up Inside to fire a button action
This one I really don't get. I can only guess that it's designed to allow you to use buttons instead of the touchesBegan/Moved/Ended methods. I guess it could be useful, but I've never used anything but Touch Up Inside.
Supporting the screen rotation
Many apps just don't work in any other orientation, such as games. If you want to use rotation, you only have to add two lines of code assuming you've done your layout well.
I hope this helps explain some of the strangeness. Aside from the keyboard dismissal, I've never really found anything too annoying. The one thing I wish they supported was using the highlight state of UIButtons for the set state. It would be a quick and easy toggle button, but I've taken to screenshotting a highlighted button and using that for the background image of a selected button.
Want a rounded rectangular button that isn't white? Since that one uses a background image, you can't just click something somewhere that makes it the color of your choice. You have to create your own image or you could even use CSS (WTF!?) to do it.
Unfortunately, the iPhone SDK lacks a lot of helpful things one would think would just be there. However, many people have taken the time to write wrappers for many of these kinds of things to help facilitate development - a quick google search into the functionality you are expecting may turn up a lot of useful answers!
For example, you could make the keyboard go away when you tap outside of it by creating a new view when it appears, and placing that view behind any user-interactable views on the screen. When that new view is tapped, it will become first responder and cause the keyboard to slide away (because the UITextField is no longer first responder).
Such a thing could be easily implemented as a drop-in fix for pretty much anything you'd need it for with very little code.
Still should have been included in the SDK in the first place, though!