Questions tagged uiscrollview

Explore the latest questions and answers asked by our top developers.

SWIFT: How to fix cell highlighter and make the whole collection view scroll instead of the highlighter?

I am building a TVOS app where I have this collectionView: The current cell (The cell which has scrolled to), gets highlighted in Orange. For example, here the user scrolls to the third cell: WHAT I AM TRYING TO ACHIEVE: When the user scrolls to another cell, I want the Orange square, to remain in […]

By Ahmed Ghrib
Published
Categorised as swift, tvos, uicollectionview, uiscrollview Tagged , , ,

UIScrollView Content Offset on Initialization

We are currently working in an older codebase for our iOS application and are running into a weird bug where the UIScrollViews paging is not matching on the initialization but only once a user selects the button to change the view. Each ScrollView has three slides nested inside of them. We initialize the ScrollView like […]

By Keeano
Published
Categorised as ios, swift, uiscrollview

Handling keyboard events when view controller has a scrollview inside

In my project, there is a view controller which is embedded inside a tab bar controller. This view controller has a button which shows a drawer (a slide-in view). I’m using this third-party library for this. I’ll refer to it the panel view controller from now on. This panel view controller is a simple view […]

By Isuru
Published
Categorised as ios, ios13, swift, uikeyboard, uiscrollview

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 width. I want to auto scroll to next/previous page if drag distance is more than 25%. I was able to achieve it […]

By vandzi
Published
Categorised as ios, swift, uiscrollview, uiscrollviewdelegate

Snapshot scaled UIView

Snapshotting a UIView using UIGraphicsGetImageFromCurrentImageContext() and a variety of other approaches including the render(in:) and drawHierarchy(in: afterScreenUpdates:) functions works great when you need to render a regular ol’ view. I have been unable to get any of this working properly when trying to draw a scaled UIView hierarchy. The view in question is a UIScrollView‘s […]

By Samuel Spencer
Published
Categorised as ios, rendering, swift, uiscrollview, uiview

Scroll view with container view doesn’t adjust the content size correctly

I have a view hierarchy arranged this way: main view —- scroll view ——– label ——– label ——– text view ——– horizontal stack view ——– divider view (UIView) ——– label ——– container view (embeds a child view controller) The embedded child view controller is a UICollectionViewController. Now the problem is that the collection view controller […]

By Ramy Al Zuhouri
Published
Categorised as swift, uikit, uiscrollview

UITextView Horizontal & Vertical Scroll With Proper Cursor Positioning in Swift

I am working on a project where I require to make UITextView horizontally scrollable.The problem statement is defined below I have tried putting the UITextview within a ScrollView for horizontal scroll as suggested in other similar question solution on Stack Overflow, while the scroll works there are multiple issues related to cursor position like: Dynamically […]

How to make ScrollView consume touch event even when it’s scrolled to the end?

I have an FSPagerView, which has an item that contains scrollable barchart (scrollview having multiple stackviews). When I scroll barchart, if there is a scrollable space, then touch event is consumed by the barchart and it scrolls. If there is no scrollable space on a side and I keep scrolling to that side touching barchart, […]

By Gintas
Published
Categorised as ios, stackview, swift, touch, uiscrollview

UIWorkIntervalTiming workIntervalStart

Getting console log while scrolling ScrollView. Is there way remove this? 2019-03-27 12:33:34.109573+0530 MayApp[10465:46241] [UIWorkIntervalTiming] workIntervalStart: startTimestamp > targetTimestamp; rolling forward by 1.116667 Source: Ios

By SPatel
Published
Categorised as ios, uiscrollview, uiworkintervaltiming, xcode, xcode10.2

_adjustContentOffsetIfNecessary – UIScrollView automatically scrolls to top

On iOS 7. I have navigation controller and I push a new VC on top of the stack. That new VC has a UIScrollView that fills the VC’s root view and scrolls vertically. If I scroll down a little bit and then try to use ‘swipe to go back’ / ‘swipe to pop’ gesture, the […]

1 2

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq