iOS UIScrollView with UIWebView and UITableView in Storyboard - ios

I have a complex design to create. I want to have something like this
- UIScrollView
--UILabel
--UILabel
--UIWebView
--UITableView
--UITextField
--UIButton
I am using a Storyboard and I want the ScrollView to take the height of the Full Webview and the TableView so that there is only one parent scrolling and other scrolls are disabled and the whole page seems like one single view.
Right now, the whole UI looks very messed up and only the Webview and table view scroll indivisually and the parent scrollview not scrolling at all making the labels and textfields have a constant place and the button not showing at all.
EDIT
Using raki's solution, I used a TableViewController. I have something like below:
But the webView does not cover its full content and just shows in the area shown in the image.
How can I solve this issue?

Related

iOS 11 navigationbar scroll

so, the setup looks like this:
I want to have one navigationbar and three collectionViews. I want to be able to horizontally scroll through the collectionviews and on vertical scroll the navigationBar large title animation should trigger as well.
What I have tried:
My first try was to create one horizontally.scrolling collectionView with cells having the size of the whole view and in each cell there would be another collectionView that would scroll vertically. Now, that worked great for my purpose but the large title stayed the same size - which, as I understand, is because it does not receive any vertical scroll events since my collectionViews for vertical scrolling are embedded in main collectionView.
It looked like this: https://giphy.com/gifs/50hYRx71XSdYA/html5
Then I tried a different approach. I created pageViewController and two viewControllers both with one vertically-scrolling collectionView. And ... it did not work either. This time if there was pageCurl animation, the navigation title DID animate - but I do not want a pageCurl animation, you can see that here: https://giphy.com/gifs/jFmOpEtUOyxtC/html5
Changing the animation to .scroll just disabled the title animation: https://giphy.com/gifs/l0IsGVhKKb0lzomqc/html5
I can not find a way to do this, do any of you have any idea?
Thanks!
Unfortunately the new self-collapsing navigation bar is using some private Apple-magic in the background to hook into the top-level scroll view of the view controller, therefore you cannot use this mechanism the way you've described.

Fixed Background Scrolling Effect for UIPageViewController

I've an instance of UIPageViewController in my project with an iPhone picture showing different sceneries as user scrolls.
I want a "fixed-background scrolling layout" i.e when the user scrolls, the iPhone-picture should remain fixed but only the sceneries inside it should change. How could I do that?
For example: In https://sdslabs.co/#muzi, as you scroll down the Mac-picture is fixed but the picture inside it changes.
Another example can be seen in the 'Numerous' iOS app.
I am assuming that you know how to implement UIPageViewController. I am just explaining how to design your Layout to achieve this.
In your FirstViewController's View add a UIImageView containing iPhone's background in which your images will change on scrolling. Add another UIView as a sibling of your UIImageView and add ContainerView in it. Your PageViewController will be embedded in your Container View.

Two UIViews & one UICollectionView inside UIScrollView (or better approach)

I need to have iOS app with screen like this:
screen
The idea is when user start to scroll down the first UIView to move up until the second UIView reach the top where it will stick and only UICollectionView will continue to move up.
Currently I'm using this structure
UIScrollView (main scroll)
UIView (some banners)
UIView (UISegmentedControl)
UICollectionView (grid with items, scroll is disabled, main scroll is used)
I manage to do it, but I needed to set UICollectionView height constraint manually in the code (calculated based on all items in grid) in order to appear in UIScrollView (everything else is handled by AutoLayout in Storyboard). The problem with this is that UICollectionView think all cells are visible and load them, so the whole recycling & reusing thing does not work. It's even worst because I use willDisplayCell method on UICollectionView to load more data when last cell is displayed, but now it load all pages at once.
My question (actually they are 2)
How can I fix the issue above?
What is the right way to achieve this functionality? Maybe my whole approach is conceptually wrong?
Collection view is a scroll view itself. So maybe you could have same functionality only with Collection view with sections or even custom layout?

UIScrollView behavior is different in iOS8

I have the following layout
So it's basically a scroll view that occupies whole screen. Content size is set to triple-width and same height. Inside the scroll view - there is container view and three table views - one per page. Only middle table view is visible initially.
This allows me to use scroll view horizontal scrolling to navigate between the tables and vertical scrolling inside the middle table.
I know that Apple doesn't really recommend putting UITableView inside UIScrollView, but in this particular case I don't know how to implement it differently, and until iOS8 everything was working fine.
UIScrollView would not recognize any vertical scrolling (since content height was equal to scroll view height) and these gestures were passed directly to UITableView.
But starting in iOS8 - this getting broken. UIScrollView would allow some vertical scrolling and basically intercept scrolling gestures sent to UITableView.
I created a simple project that works fine in iOS7 but is broken in iOS8. Anybody has any idea how to fix this problem?
Link to the project: https://dl.dropboxusercontent.com/u/6402890/TablePaging.zip
I haven't been able to solve this and as I mentioned in comments had to re-write logic using built-in UIPageViewController class.
If I change the Class of your ScrollView in Interface Builder to UIScrollView, it fixes part of the problem. Now just the UITableView goes up and down, and I go left-and-right, but haven't gotten rid of the space at the top.

UIScrollview, how to scroll a page under another window

I have a UISCrollview loading webviews, as the user starts scrolling to go to the next page, I need to have the the coming webpage to scroll into the screen from underneath another UIView that is stationary, I tried changing the alpha but its not really what I am looking for. how can I accomplish that?
For example, the scroll direction is top to bottom, now I have a uiview at the top of the screen which has some static data showing ( title, location, and other text labels ), and as the user scrolls down I want the content to scroll underneath the label ui view. Hope this clarifies it.
If I understand this question correctly I'd say you can't do this with a UIScrollView. Instead, you could have separate views for each UIWebView and handle the panning of one view under another with a UIPanGestureRecognizer.
Also, did you know there can be conflicts when using UIWebView's inside UIScrollView's?

Resources