In UITableView I can call tableView.contentOffset.y; in order to get where the user has scrolled. However, WatchKit's WKInterfaceTable doesn't support that. Is there any way to get the scrolling position in the WKInterfaceTable?
Use case why this is necessary:
user is in the middle of a table
table updates
table scroll jumps to top
user has to scroll down again
I am able to scroll down programmatically with self.messageTableOutlet.scrollToRow(at: (size-1) but the user doesn't always want to get thrown to the end of the table. He also doesn't want to get to the top, he just wants to stay there.
Related
I made a custom dropdown. In the last line of the table, scroll is created when dropdown is open. I need to scroll to see dropdown elements. I do not want this.
I want you to open up the body of the dropdown or enlarge the body. How can I do it?
Document is already enlarged by enlarged content/element, scroll shows that. You need only scroll to view entire enlarged element, f.e.:
elmnt.scrollIntoView(false);
Real problem (using react) is that should be done after change state and rendering enlarged element.
I probably would use setTimeout called from setState callback. It's quite common way to be sure it's called after updating state/view. You'll find examples on SO.
Does anyone know if it is possible to have a view above a WKInterfaceTable that doesn't scroll? I am needing to have some information stay at the top as the user scrolls, but no matter what I try the group/view scrolls out of view.
Using a heavily customized version of the scheduler, I'm getting reports that users are having trouble figuring out how to scroll horizontally. I imagine it's because the scrollbar is at the bottom of the schedule and on Mac OS, it's potentially hidden if the user has a trackpad.
My schedule functions similar to this one minus the vertical scroll. If you're on an Apple laptop and only using trackpad it's likely you won't see a scrollbar at all. If the scroll bar is visible, it's buried under the page's fold.
Ideally, I'd have arrows near the times so users could click left or right and that view would scroll left or right. I've been unable to figure out a way to programmatically call $.animate({ scrollLeft: ... }) on any piece of the scheduler and scroll both the contents where events are and the header where times are.
It looks like I can get and set the position of at least the timeline with $( '.fc-time-area .fc-content table' ).offset() but it won't move the contents of the schedule itself.
Any idea how I can move the schedule content (events) and the timeline in sync with each other?
Bonus internet points if you can tell me how I could ensure that I'd only move the container to it's end. (i.e. If the schedule for that day ends at 10pm, don't allow me to change the offset to something beyond 10pm)
Any idea how I can move the schedule content (events) and the timeline in sync with each other?
To get to the beginning of the view:
$('.fc-body .fc-time-area .fc-scroller').scrollLeft(0);
And for scrolling to the end of the view, you can do something as follows:
var scroller = $('.fc-body .fc-time-area .fc-scroller');
var scrollWidth = scroller[0].scrollWidth;
scroller.scrollLeft(scrollWidth);
As soon as I display my search bar in the navigation controller, the behavior of the search results table changes - the table content is offset vertically by about 60px.
Changing the table's contentOffset on the delegate ResultsWill/Did Appear makes no difference.
Setting displayInNavigationController = false restores expected alignment of results (directly below search bar with no gap).
The blank area appears to be part of the table/scrollview, as I can force the results cells to temporarily display in the blank section by scrolling down.
Any idea how to get those first result cells to display at the top of the results window?
It looks like you have viewController.automaticallyAdjustsScrollViewInsets set, but you don't actually want this adjustment. You can turn this option off via either Interface Builder (find "Adjust scroll view insets" checkbox) or programmatically.
I have a ReorderList on my page and it works just great, but...
Now, I have almost 100 items that I'd like to be able to reorder and they flow off the page, even at 8pt. When dragging, the page does not scroll as I approach the bottom (or the top) so I have to drop my item, scroll down, then drag some more. When I drag and drop in Word, as I approach the bottom of the window, the window scrolls so I can move to where I want to drop.
Alternately, it would be fine with me to have the items show up in multiple columns - their width would allow at least 3 columns. But none of the CSS solutions I have found which allow a <ul> to have multiple columns seem to work as they require multiple <ul>s which I don't think I can do with the ReorderList control.
Any ideas?
Here is an idea: Check if the left mouse button is being hold down, and also check for the position of the pointer on the page. If the coordinates are down at the bottom of the page at a position that you think is down enough for the page to be scrolled, then you could use the window.scrollBy() Method, and stop it when the Mouse button is released. You could also set a bool value when a Reorder item is clicked and while the button is down, and set it to false when it is released, and again the same idea, check for the position of the pointer.
Sample window.scrollBy()
Good luck!