I was wondering, I'm currently using a slide in and out page transition when the user presses a Next of Previous button on the appbar.
( concept: going through a set of articles inside a selected category )
This all looks great, I'm also able add the drag / flick gesture listeners to trigger this page transition... so no problems there.
But now I wanted to add the final part, when the user starts the drag / flick gesture, show this visually so that the page follows the gesture and 'slides' out of frame.
But how to do this? An example would be great :)
But there is also a small extra thing, I don't want the user to always do a full drag... so if we are over 2/3 of the screen, auto start the page transition IF the gesture stops ( so the user lifts up his finger )
So I would like to create a nice reading experience that shows the gesture visualy and performs the page transition...
You can check the following link: https://stackoverflow.com/a/9915016/1565574
In the ManipulationCompleted you'll be able to detect the GestureType and take an action there.
And I found that link: https://stackoverflow.com/a/4342558/1565574 (using the GestureService)
I first started with the DragFlickBehavior from #LocalJoost and it actually worked great!
But in the end I switched to a headerless pivot! Works also great!
Related
Alright here is my issue. I have a Pivot view. Inside that pivot view a scroll viewer containing many stack panels and grids. On some of the grids I have MouseButton Up Events. What is happening is if I flick the scroll it scrolls as expected but when I release my finger most of the time it fires off the event from mousebutton up. Because technically I let up. The problem is these grids completely fill the screen so finding an area without a mousebutton up to scroll is near impossible. What I want to happen is if the user flicked to scroll I would ideally like it to ignore the mousebutton up event. It does this successfully sometimes but pretty rarely and I have noticed I have to flick pretty fast for it to work as expected.
Any ideas on how to prevent this activity. I assume there is as Listboxes work perfect.
i think u should use windows phone toolkit GestureListener to recognize flick event
I ended up setting a bool for when the scrollviewer was scrolling and based on that allowing the mouseup action to run my code. Here is the the site I used to implement the bool based on scrolling status.
http://blogs.msdn.com/b/ptorr/archive/2010/07/23/how-to-detect-when-a-list-is-scrolling-or-not.aspx
I would like to implement a modal view similar to the screenshot below.
When the user presses a tab-bar (help) button, I want the view to appear showing the first of multiple pages of help screens, with the page-control dots for sequential navigation via swipe gestures left and right to navigate to each help page.
Amazing what an extra bit of research will produce. Found examples of using UIScrollView with UIPageControl to achieve something similar.
I've added a few overlay images which I'm using as buttons/control for showing / hiding some custom layers and this works fine, however they still trigger the usual drag/move events on the map. This isn't that bad but when you go into street view and you click on on of these (the buttons are on the left of the screen) the camera shifts it's view to the left which is going to be very annoying for the users.
Just wondered if someone has encountered this and have advice? I guess I can move the buttons out of the maps area completely but it looks really nice on the map with the standard controls.
Thanks a lot!
I have 2 NSButtons, both are bordered momentary push-in buttons. I have a main window to which other views are swapped in and out. These two buttons are in the main window custom view (next,previous) which helps to navigate through the views.
When I reach the 2 view with the help of next button, I make the previous button enabled and visible. So if I press the previous button at this point the 1st view will be swapped in and I make the previous button transparent and enabled.
At this point if you press the next button to navigate to second view, the 2nd view will be swapped in and the previous button is displayed again. But it is highlighted here. How can I get rid of this?
I hope you will get some better answers, but a general technique that I have found to work in cases like this is to wait with enable/disable actions until things have settled down for the new configuration of the views.
After all (if I have read your description correctly), you are hiding a button in the middle of its own action handler.
Postponing this is easily obtained by dispatching your enable/disable code on the next (or, more correctly, a later) invocation of the run loop of the main thread:
dispatch_async(dispatch_get_main_queue(), ^{
// Enable or disable your buttons here.
});
As a solution it is somewhat of a hack, but on the other hand, waiting until your main view is no longer in a state of flux before you re-configure your navigation UI is not a bad approach.
Summery:
I have a custom UITabBarAutoRotateController which returns YES from shouldAutorotateToInterfaceOrientation. This has no effect.
If I minimize and show the app again, the rotation issue goes away.
How do I refresh the screen so the user does not have to do this (so rotation works again)?
Details (setup graphically, so no code):
I have two UITabBarController in MainWindow.xib. I only want one to show at a time. So I am linking graphically rootViewController = tabBarController_name1. There is also tabBarController_name2.
I will also have an alert MessageBox for a user to choose what type of application they need, and it will choose a tab bar controller based on their request (per customer definition). This is commented out for now.
There is a bug with Rotation when two UITabBarControllers exist on the same xib. When I try to rotate the screen, it stays upward with wherever the main screen button (power button looking button) faces. HandleOrientationChange does not get called on the active custom ViewController being shown.
The reason I believe it's a bug is because if I hit the main screen button (minimizing the application), and click back on the application (brings it back to the foreground), rotation works perfectly!
Sorry for making you read all that mumbo :). My true question is, "Is there anyway I could refresh the main window or likewise UITabBarController's to get rotation working (without requiring the program be minimized and shown)"? A work-around, if you will?
p.s. I cannot use Storyboard for backwards compatibility reasons. The customer will be receiving this code/project. So I would like to keep this in one graphical page, rather than hiding/showing UITabBarItem's.
EDIT: two-uitabbarcontrollers-and-autorotation and uitabbarcontrollers-and-uinavigationcontrollers were both helpful, but did not address "why" this issue happens. "noob" here when it comes to xcode :)
Tab bar controller inside a navigation controller, or sharing a navigation root view is the answer. Do not use a TabBarViewController. Which, as a noob, I'm not quite sure why TabBarViewController exists (or at least isn't depreciated).
Dragging two TabBarViewControllers into the same page should result in a warning saying that you probably want to implement TabBarViewController by making a custom UIViewController and attaching a plain UITabBar to it.
Frustrating...but finally making progress :)