Swift image view scrollable without using UIScrollView - ios

Is there a way to make an imageView scrollable without using a UIScrollView. If I zoom my picture I can't scroll, that's what I'm trying to solve

Related

How to handle an UIScrollView in an UIScrollView

I want to use an UIScrollView in an UIScrollView. I think it would be clearer with a
picture
The black border is the border of the screen, the purple is the first UIScrollView and the blue is the second UIScrollView. The arrows show the direction of the scroll.
When I try to put the second UIScrollView in the first with a different scrolling direction, the second show the content twice... I made a video
I have created design for you to explain how to add scroll view inside scroll view.
Here see the following image with constraints.
Note: This is static view not dynamic, This is create to clear concept of ScrollView inside ScrollView. If you are planning to make ScrollView with design then you need to do some more study on AutoLayout with ScrollView.

Scroll horizontally in UITableView - Swift 3, iOS

I need to horizontally scroll through a list of thumbnails at the bottom of the screen that shows all the user's recently taken photos / videos.
I created a UIScrollView with a UITableview inside of it.
Is this the correct approach because I can't seem to find an override method in its superclass for scrolling direction?
Most of the topics I can find online deals with putting a UIscrollview inside a TableCell, which will not work for my specific application?
The hierarchy is:
View > Scroll View > Table View > Table Cel > Content > PhotoThumbnail
Below is a screenshot of what I'm trying to do:
I am not really sure why do you want to use UITableView for horizontal scrolling which lay out there cells in vertical manner. If you want horizontal scrolling I would recommend using UICollectionView where cells can be added horizontally or vertically or both.
Still if you want tableview to be scrollable in horizontal direction I would suggest you to check this project to get inspiration or using it.
https://github.com/alekseyn/EasyTableView
Instead of using UITableView you can use UICollectionView to achieve the desired result i.e, horizontally scrollable cells with imageView and other elements that you need.

Swift image slider/carousel UIPageViewController vs Scroll View

I found these examples of doing a images slider/carusel. One using a UIPageViewController and one using a scrollview
In my app I need to embedd a image slider inside a contentview for a VC, then also add click to enlarge to view the image in fullscreen as well. So what are the pros/cons for using a UIPageViewController or a scrollview?
Looking at the two examples they look like they behave the same beside the UIPageViewController showing dots/indicators
I wouldn't recommend using a UIScrollView, (too much work/potential for bugs resetting the scrollView's contentOffset for sliding through the gallery smoothly).
When I've implemented a sliding image gallery before I used a UICollectionView. The collectionViewCell's bounds match the parent collectionView's, the cell contains an imageView pinned to the edges of the cell and the collectionView's scrollDirection is set to horizontal.
You can add a UIPageControl on top of the UICollectionView if you want, it's not necessarily an essential feature. As an alternative to using a UIPageControl I've added a UILabel to float above the screen coordinates of the UICollectionView and update its value based on the number of items and the currently displayed cell in the collectionView. E.g. 1/4 -> 2/4 etc.

ios swift - scroll view over image doesn't scroll

I want to have a background image that does not move and have a scrollview over it that allows users to scroll through content while the back image remaining static.
I have tried adding an image to my view and then after a scroll view over it but I'm unable to scroll.
I'm trying to achieve an effect similar to this:
Am I on the right path to achieving this?
You have to set contentSize for UIScrollView. ContentSize has to greater than frame size.

Scroll UIImageView with UIWebView?

So I've got a UIScrollView that has an image inside, and below that I have a webView. How can I make it so that when I scroll the webView up/down, the scroll view also scrolls up/down? Like when you scroll in Safari, the URL bar moves along with it.
Here's what I'm using:
first add the UIWebView and UIScrollView+UIimageView within an
another UIScrollVIew
disable the native scrolling of UIWebView byt iterating its subviews
disable the scrolling of the UIScrollView which consists UIImageView
by doing this way will help your cause

Resources