uiscrollviewdelegate

UIScrollView delegate methods not calling properly

≯℡__Kan透↙ 提交于 2020-01-24 06:40:30
问题 In order to scroll up and down i need to call two methods for that I have used the below method .I am using scrollview delegate method for UICollection as it is the subview for UIScrollView .Here is the code that I have written but the scroll is not easily moving and the result is also not accurate for some times can any one suggest.? - (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView{ CGPoint mScrollPosition = [scrollView.panGestureRecognizer velocityInView:mCollectionView];

UIScrollView delegate methods not calling properly

我与影子孤独终老i 提交于 2020-01-24 06:38:08
问题 In order to scroll up and down i need to call two methods for that I have used the below method .I am using scrollview delegate method for UICollection as it is the subview for UIScrollView .Here is the code that I have written but the scroll is not easily moving and the result is also not accurate for some times can any one suggest.? - (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView{ CGPoint mScrollPosition = [scrollView.panGestureRecognizer velocityInView:mCollectionView];

scrollViewWillEndDragging:withVelocity:targetContentOffset: not working on the edges of a UISCrollView

牧云@^-^@ 提交于 2020-01-20 20:06:45
问题 I'm trying to implement a custom tab bar which is scrollable and has paging at each tab bar item. For that i'm using the delegate scrollViewWillEndDragging:withVelocity:targetContentOffset: which works perfectly with one problem. The way my paging works is, if the contentOffset is near the right item, it the targetContentOffset changes to the offset of that item. Same thing for the left side. The problem is, whenever I'm at at the left half of the first item and the right of the last (the

scrollViewWillEndDragging:withVelocity:targetContentOffset: not working on the edges of a UISCrollView

倾然丶 夕夏残阳落幕 提交于 2020-01-20 20:06:29
问题 I'm trying to implement a custom tab bar which is scrollable and has paging at each tab bar item. For that i'm using the delegate scrollViewWillEndDragging:withVelocity:targetContentOffset: which works perfectly with one problem. The way my paging works is, if the contentOffset is near the right item, it the targetContentOffset changes to the offset of that item. Same thing for the left side. The problem is, whenever I'm at at the left half of the first item and the right of the last (the

UIScrollView not respecting minimumZoomScale after changing the subview

那年仲夏 提交于 2020-01-13 11:55:11
问题 I'm hitting a problem getting a UIScrollView to update correctly in response to a change in the minimum zoom scale. The scrollview has a UIImageView as a subview, and the image property of the UIImageView is set in response to the didFinishPickingMediaWithInfo method of UIPickerView: - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { UIImage *takenImage = [info objectForKey:UIImagePickerControllerOriginalImage]; [self.imageView

Conflicting Parameter Types for Scroll View Delegate

旧时模样 提交于 2019-12-25 02:29:40
问题 I have the function: - (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale The declaration is copied from the documentation. However, I am getting a "convicting parameter types " warning 'CGFLoat' (aka double) vs 'float'. Changing the float to a CGFloat does not make the warning go away. How do I fix? 回答1: The (current) online documentation is actually wrong (or not up-to-date). It is documented in the iOS 7.0 API Diffs that the declaration of

UIScrollView, sliding, zooming

回眸只為那壹抹淺笑 提交于 2019-12-24 22:33:20
问题 I have an app which has a uiscrollview, which in turn has two uiimageviews. The scrollview works fine in sliding between both imageviews, by making the content size twice the width. like so [self.scrollView setContentSize:CGSizeMake(self.scrollView.frame.size.width * 2, self.scrollView.frame.size.height)]; Now the client wants the user to be able to zoom into any image in those two images. He does not want another modal view with the selected picture zoomed in, but rather on the same

UIScrollView doesn't remember the position

一曲冷凌霜 提交于 2019-12-22 09:28:15
问题 Has anyone ever had the problem that a UIScrollView , which gets moved by [UIScrollView setContentOffset:...] doesn't "remember" it's new position? It however does, if the user scrolls via touch-and-drag. Symptoms: If the UIScrollView doesn't remember the new position, it "flips" back to the original position it last remembers (which is the position which has been used via touch-and-drag) whenever it's being touched. Interesting: This only happens in 4.0 and didn't happen in 3.1 This only

How much contentOffset changes in UIScrollview for zooming?

做~自己de王妃 提交于 2019-12-21 20:39:19
问题 In UIScrollview, when I scroll/drag, I got changes in scrollview contentOffset which represent how much I had scrolled/dragged in the scrollview. By this way, I have updated the subview of scrollview for scrolling. But, when I zoom the scrollview (using pinch zooming), the contentOffsets of the scrollview is also changed. I do not understand how much contentOffset has changed because I can not relate the changes with zoomScale value. So, is there anyway to know changes in contentOffset for

iphone: scroll in a view

别来无恙 提交于 2019-12-21 03:21:13
问题 I would like to ask a basic iphone question. I have many TextFields in iPhone view, when I tap to input in a TextField, the Keyboard shows up and hide other TextField. I would like to make the parent view scrollable. Would you please show me the example code? Thank you very much 回答1: You can listen for the keyboard up and down notification. and move your view just above height of keyboard. In the ViewWillAppear method: NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; [nc