uiscrollview

In React Native, how can I get the Y offset of a custom component and then scroll a ScrollView to its position?

倾然丶 夕夏残阳落幕 提交于 2021-02-19 09:13:47
问题 In React Native, I have a screen with a ScrollView : let scrollView; let myComponent2; function onPress() { myComponent2.measure((frameOffsetX, frameOffsetY, width, height, pageOffsetX, pageOffsetY) => { scrollView.scrollTo({ y: frameOffsetY }); } function MyScrollView() { return ( <ScrollView ref={ref => scrollView = ref}> <MyButton onPress={onPress} /> <MyComponent1 /> <MyComponent2 ref={ref => myComponent2 = ref} /> <MyComponent3 /> </ScrollView> ); }; And MyButton is defined like this:

WPF - ScrollView Confusion

孤人 提交于 2021-02-19 02:36:33
问题 I am new to WPF and the ScrollViewer is frustrating me. Either I just don't "get" it, or it is a limited control. Here are my Frustrations: Bad Horizontal Scrolling The horizontal scroll bar is only visible at the bottom of the list (I have to scroll to the bottom to see it) Bad Borders I have a ListBox in my ScrollViewer. When I start the bottom of the list has no border and when I scroll down, the top border (line) of the list box disappears. I can kind of understand this, but attempts to

Keyboard events called before UITextView delegate events

。_饼干妹妹 提交于 2021-02-10 05:30:52
问题 I have a UITableView with UITextViews and UITextFields on it's cells. As obvious the keyboard overlaps the lower cells and you cannot see what you are typing. So I want to scroll the tableview to get the field visible. I wrote the code the iOS docs recommended: https://developer.apple.com/library/ios/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html BUT the keyboard event callback keyboardWillShow: is called before the UITextView edit

UITableView in UIView in UIScrollView. When scrolling tableview don't scroll scrollview too

99封情书 提交于 2021-02-09 08:49:07
问题 I have a UITableView inside a UIView inside a UIScrollView. Problem: when i scroll/drag the tableview, the scrollview scrolls too. What i need is for the tableview not to pass the scroll to the scrollview. Also i need to be able to use the scrollview when i scroll it directly. How can i do this? Cheers 回答1: I fixed it using "hitTest" on the tableview. - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event If the event originated within the tableview, i disable the parent's scrollview

UIScrollView callbacks while animating internally

给你一囗甜甜゛ 提交于 2021-02-07 20:32:20
问题 I have UIScrollView with one child that is zoomed (returned in viewForZoomingInScrollView:scrollView) and a number of other children which annotate the zoomed view and should always be positioned on top of the zoomed view at relative coordinates UIScrollView - zoomChild (size 100x100 at scale 1) - Annotate Child (size 10x10), always placed at relative position (0.2, 0.2) of zoomChild's frame I've subclassed UIScrollView and overridden scrollViewDidZoom:. I position an annotation child like -

Synchronize scrolling with two collection views in Swift?

自闭症网瘾萝莉.ら 提交于 2021-02-07 10:54:32
问题 Is there a practice to scroll a collection view with cells, and, depending on its content offset, scroll the other collection view? I have a main collection view that has two cells and scrolls horizontally. Then I have a second collection view with cells that scrolls vertically. What happens is when I scroll up, then scroll horizontally to the second vertical cv, it's not synced with relation to the first. I overrode the scrollViewDidScroll inside the vertically scrolling collection view (not

How to make a UIImage Scrollable inside a UIScrollView?

自作多情 提交于 2021-02-07 10:39:54
问题 I currently have a ScrollView and inside the ScrollView i have a UIImageView . I get different image sizes from my server and most images are larger than the bounds of my screen. I would like to scroll through the image if it is bigger than my screen. Something like this.... This is what i have tried so far. let image = UIImage(named: "myImg") let heightInPoints = image?.size.height let heightInPixels = heightInPoints ?? 0 * image!.scale let widthInPoints = image?.size.width let widthInPixels

How to make Horizontal scrollView and some buttons in it (programming)

橙三吉。 提交于 2021-02-07 04:10:58
问题 sorry,I have a problem.I don't use storyBoard. I want to make a view like this. photo by terenceLuffy/AppStoreStyleHorizontalScrollView but I try to do this. Finlly,scrollView just show last button like this. This is code: var scView:UIScrollView = UIScrollView() var buttonPadding:CGFloat = 10 var xOffset:CGFloat = 10 scView.backgroundColor = UIColor.blue scView.translatesAutoresizingMaskIntoConstraints = false func viewDidLoad() { for i in 0 ... 10 { let button = UIButton() button.tag = i

How to make Horizontal scrollView and some buttons in it (programming)

可紊 提交于 2021-02-07 04:10:34
问题 sorry,I have a problem.I don't use storyBoard. I want to make a view like this. photo by terenceLuffy/AppStoreStyleHorizontalScrollView but I try to do this. Finlly,scrollView just show last button like this. This is code: var scView:UIScrollView = UIScrollView() var buttonPadding:CGFloat = 10 var xOffset:CGFloat = 10 scView.backgroundColor = UIColor.blue scView.translatesAutoresizingMaskIntoConstraints = false func viewDidLoad() { for i in 0 ... 10 { let button = UIButton() button.tag = i

UIScrollView ignores frameLayoutGuide constraints on iOS 12 when built with iOS 14.1 SDK

风格不统一 提交于 2021-02-05 12:23:04
问题 I just wasted an hour with what looks like an iOS 14 SDK regression when running on iOS 12 so I thought i'd post this in case it helps others. Summary : When pinning the frame of the UIScrollView with the frameLayoutGuide as we've always done, this breaks on iOS 12 when the scrollview is contained within another view (in my case in a child viewcontroller, not sure if that matters). Setup : View setup, all views using autolayout: UIView "scrollviewContainerView" [fixed/unchanging size] | \-