397
questions
-1
votes
1
answer
72
views
How to get the view which is centered(or visible to user) inside UIScrollview?
I have a UIScrollview with horizontal pagination, inside which there are five different view. These are scrolling perfectly as required. And now i also have five buttons on the top of my screen, on ...
0
votes
1
answer
152
views
Dismiss does not work correctly UIScrollView and UITableView
I have a UIViewController class that is presented over full screen
On it I have a scrollview and a stackview with a uiview and a table
view.addSubview(scrollView)
scrollView.addSubview(stackView)
...
0
votes
1
answer
237
views
UIScrollView scrollViewWillBeginDragging not called when content size small
UIScrollView delegate method not called when its content size is small. Is there any way to get event of scrollViewWillBeginDragging
func scrollViewWillBeginDragging(_ scrollView: UIScrollView)
2
votes
1
answer
1k
views
Detect userEvent/pan/scroll on orthogonal sections in UICollectionViewCompositionalLayout
I am using autoScroll on an orthogonal section of the collectionView using compositional layout. I need to invalidate the autoscroll timer as soon as the user manually scrolls the section.
I could use ...
0
votes
1
answer
44
views
UIScrollView – Adjust User Scroll Amount Akin to Scrubbing?
I have UIScrollview that the user scrolls up and down.
Is there a way to adjust how much the user's drag of the finger results in the final scroll amount?
I was looking at UIScrollview delegate ...
0
votes
1
answer
175
views
Subclassing UIScrollview does not trigger delegate methods
Hello everyone i am trying to implement scrollViewDidScroll in a seperate class for a UIScrollview in my ViewController. Does not trigger the method...Any help appreciated.
C8MyProfileScrollView.h
#...
0
votes
1
answer
607
views
UIScrollView - when is contentSize set
I have a UIViewController and it's view hierarchy looks like this:
UIView
UIScrollView
UIImageView
I have code that positions the image view in the middle of the scroll view's frame, like so:
- (...
0
votes
0
answers
200
views
UIScrollViewDelegate method only called when view is initialised
I'm trying to set a scrollView method that will essentially disable the bounce at the bottom of the view. So, I've made my view controller conform to UIScrollViewDelegate:
class MainViewController: ...
0
votes
1
answer
339
views
Swipe only to the left using a UIScrollView
I have a scrollView with the delegate method set.
private let scrollView: UIScrollView = {
let scrollView = UIScrollView(frame: .zero).usingAutoLayout()
scrollView.isPagingEnabled = true
...
0
votes
1
answer
408
views
use UIScrollView to show CarouselImagesView
I have a UIScrollView can show a set of pages and have "carousel" effect, what I want is snap to an image after the user finishes dragging.Should I add some other func such like ...
0
votes
1
answer
2k
views
Swift 5: scrollViewDidScroll not called in UICollectionView class
Yes, I've checked other questions regarding this topic. For some reason, the function
override func scrollViewDidScroll(_ scrollView: UIScrollView) {
print(scrollView.contentOffset)
}
is not ...
0
votes
0
answers
201
views
Syncing Two CollectionViews For Navigation
I’m trying to sync two collection views proportionally for navigation. One of the collection views is menu-like and is at the top, and the second is a larger one below. What I would like is for the ...
3
votes
2
answers
3k
views
With collectionView.isPagingEnabled = true how to know when paging is completed
I have a vertical direction cell that is the same size of the collectionView and I set collectionView.isPagingEnabled = true. There is only 1 active visible cell on screen at a time:
layout....
2
votes
1
answer
1k
views
Embed PageViewController in ScrollView - Programmatically Swift 5
I have a PageViewController which shows 4 four view Controllers horizontally,
Can I embed all this viewControllers in a UIScrollView? It would be easier to manage some tasks.
Till now I tried doing ...
2
votes
1
answer
2k
views
Preventing UICollectionView from scrolling outside of contentOffset
I created a collectionView with 4 cells, the cell frames are equal to the entire window frame so that I can scroll through them as they were a PageViewController.
lazy var collectionView : ...
0
votes
2
answers
172
views
UIScrollView touch doesnt work when Auto Scroll
I have a UIScrollView inside which I have several items. I have a feature in my app if someone presses a button scroll view starts scrolling automatically at a certain speed. But that causes all the ...
-3
votes
1
answer
110
views
How can i get how to scrolled it is in uicollectionView [closed]
I’m using uicollectionview in storyboard.
When uicollectionview scroll down i want get how scrolled down In pixels
For example, if i swipe one finger, return 200 pixels.
Is it possible?
-1
votes
2
answers
402
views
Get type of UIScrollView inside UIScrollViewDelegate methods
I have a UIViewController that has UITableView and UICollectionView. I want to do certain tasks when UICollectionView is scrolled.
I've extended UIScrollViewDelegate and wrote my code in
func ...
4
votes
1
answer
439
views
How to change UIScrollView with isPagingEnabled autoscroll drag trashhold
I have horizontal UIScrollView with isPagingEnabled = true containing few pages. If I drag scrollview content and release finger it scrolls to next page only if I dragged at least 50% of scrollview ...
0
votes
1
answer
36
views
textField will not move in programable scrollview
I have a UIScrollView. I have a UITextField and a UILabel. For some reason my UITextField it will not move in my scroll view but my UILablel will. I have added the UITextField the same way as I added ...
0
votes
1
answer
18
views
Need to move the top red selector along with the bottom list scrolling
I need to move the above shown red selector along with the bottom horizontal scrollview. Currently it is happening after the scrolling is finished.
Here is my code that I am using:
- (void)...
0
votes
1
answer
38
views
UIScroll callback in controller or view class
I have a subclass of UITableview (Code below). I have used this class in my view controller. I want the callabck of scroll view in my table class. How can I get the callback in LargeTitleTableview ...
2
votes
1
answer
5k
views
How to implement a collapsing header?
I tried to implement a collapsing UITableView Header but right now I am not getting any further. This is my storyboard. I tried to use the scrollViewDidScroll(scrollView: UIScrollView) delegate method ...
2
votes
1
answer
400
views
UIScrollView setContentOffset (Paging) stopped by touch screen
I am doing paging effect in UICollectionView. My solution is shown below.
setContentOffset method will be called in scrollViewWillEndDragging and calculate the next or previous page contentOffset x ...
0
votes
1
answer
640
views
How to increase size of UICollectionView on Scroll
I want to increase the size of collectionView on Scroll. It's called Parallax affect.
I have 3 classes with named
1)class PhotoGalleryViewController' with storyboard.
PhotoGalleryViewController ...
0
votes
0
answers
43
views
How do I remove content that is no longer showing in a UIScrollView
I have created a modified paging UIScrollView. I have implemented lazy loaded pages however I would like to remove the content that is no longer being displayed on screen in order to conserve memory. ...
0
votes
1
answer
170
views
Apple Page Control sample code gives black screen
Ive downloaded Apple's PageControl Sample Code to try to learn how to create lazily loaded pages as the user scrolls. However right out of the box as I scroll the picutres disappear and I get a black ...
0
votes
1
answer
303
views
Is there a quicker way to detect UIScrollView's contentOffset/how does UIPickerView trigger feedback even at high velocities?
I have a horizontally-scrolling UICollectionView to mimic iOS's UIPickerView. Now, I want to trigger haptic feedback when selection changes just like UIPickerView does.
The problem is that when you ...
0
votes
1
answer
2k
views
Delegate methods in UIScrollViewDelegate don't respond to table view scrolling event
I'm trying to do pull to refresh and infinite scrolling to table view without the need for external libraries
I was setting the delegate correctly:
tableView.delegate = self
But when scrolling ...
1
vote
0
answers
51
views
Glitchy UIScrollView Infinite Scroll
Im trying to implement an infinitely paging UIScrollView based on the Advanced ScrollView Techniques from WWDC 2011. The problem that Im facing is that as I scroll the screen keeps on Jumping ...
1
vote
1
answer
498
views
Zoom only horizontally UIView in UIScrollView
I have tried some solutions from other posts but I haven't been able to solve the question I am going to post.
I have a custom UIView that draws a SoundWave and it contains a UIScrollView. The ...
0
votes
1
answer
917
views
Assign function to UIScrollView when scrolling (Swift)
I have a UIViewController with a UIScrollView I've added in Interface Builder. I want to have scrollView functions so I can detect if it's been scrolled up or down. My scroll view is attached with an ...
1
vote
2
answers
157
views
How to get UITableView last scroll position before show next UIViewController?
I have a question about UITableView.
Because I want to save the UITableView last position in my userdefault before showing next UIViewController.
And when I back to homePage I can read userdefault ...
3
votes
1
answer
2k
views
UIScrollView change contentInset while scrolling
I’m trying to implement a custom top bar that behaves similarly to the iOS 11+ large title navigation bar, where the large title section of the bar collapses when scrolling down the content:
The ...
1
vote
0
answers
131
views
I wanna trigger an action when user start to scroll in ios from third party
I have two layers: Application and Framework. The application layer has all of the views. The framework layer doesnt have any views but when the application layer calls into the framework layer, an ...
0
votes
1
answer
70
views
How to get the CGRect of the UIScrollView after scrolling?
I want to get the CGRect or just x,y of the area the scrollview currently shows after user has dragged the view when calling scrollViewDidEndDragging
3
votes
3
answers
3k
views
scrollViewDidScroll not getting called (I set the delegate!)
Situation:
I am creating an imageGallery which is a viewController that I am presenting modally. I have created it all programatically, I haven't touched the storyboard.
The viewController has a ...
1
vote
1
answer
825
views
UITextField not working with add constraints programmatically
Here is my code , I am adding UITextfield programtically in scrollview. But UITextField is unable to open keyboard.
It looks like UITextField is not enabling even added user interaction enabled true.
...
0
votes
1
answer
46
views
ScrollView Is Not Moving Correctly with Next and Previous Button tapped in objective C
-(IBAction)nextButtonTapped:(id)sender {
if (moreItemsgridView.contentOffset.x<=moreItemsgridView.contentSize.width) {
CGRect frame;
frame.origin.x = moreItemsgridView....
2
votes
0
answers
373
views
preforming a scroll view driven interactive transition
In the apple music app there's a transition from the opened music player that is seemingly driven by the scroll views content offset as pictured below.
Behavior: The scroll view behaves like normal ...
1
vote
1
answer
933
views
iOS UIPageViewController ScrollView offset getting wrong value
I have a UIPageViewController and conform to UIScrollViewDelegate via
for subView in self.pageVC.view.subviews {
if let subView = subView as? UIScrollView {
subView.delegate = self
}
}
...
0
votes
0
answers
542
views
UITextField Keyboard Closes after every key tap
I have looked at other answers and so far none have been helpful. The keyboard to my UITextField collapses after every key tap. I am not sure what is causing it. I have an extension which alerts when ...
1
vote
1
answer
2k
views
Gradient background color with UIScrollView
I know this question might look like a duplicate, however most answers disregard the fact of scrolling in the view.
When I scroll the gradient color stays constant through the whole scroll , and not ...
3
votes
0
answers
177
views
UIScrollVIew Changing targetContentOffset not working when pagingEnabled
I have a UIScrollView with pagingEnabled set to YES.
some of other configs are:
self.pagingEnabled = NO;
self.directionalLockEnabled = YES;
self.scrollsToTop = NO;
self.showsHorizontalScrollIndicator ...
1
vote
1
answer
178
views
Only last image is loading from url in scrollview
In my iOS app I have have a lots of view and image and labels are the subviews of the. view. My problem is while loading images from url or remote server only last image is loading from url . Other ...
0
votes
1
answer
28
views
UIScrollView Delegate Re-Routing - To check the state of UIScrollView
I have a tableView and button on the same view (Siblings),
i need to HIDE the button when the tableView is SCROLLING (Up and Down Direction no problem) and SHOW when it is STOPPED SCROLLING
I tried ...
0
votes
1
answer
613
views
Why does my Table Views scrollToRow at only scroll partially?
Im implementing a UITableView and I would like for the table view to automatically scroll up to the top once the user begins scrolling. I have used logic similar to this post to detect the direction ...
0
votes
1
answer
203
views
How to restrict UIScrollViewDelegate apply to only one view in UIViewController
I am working on an iOS app in Swift. In the app, I have a HomeViewController which has two views - a UICollectionView and UITableView.
class HomeViewController: UIViewController, UITableViewDelegate,...
0
votes
1
answer
1k
views
How can I detect when the user tried to swipe "past UIScrollView content offset"?
For example, I have a button that when the user tap on it, it will open a pop up scroll view from the bottom, which has a lengthy vertical content. If the user tried to swipe down when the scroll view ...
0
votes
1
answer
304
views
How to implement horizontal scrollview inside UIPageviewController
I have a horizontal scroll view inside a UIPageViewController.
When i scroll horizontal view, UIPageViewControllerDataSource method viewControllerAfter called.
How to disable UIPageViewController ...