iOS8 UITableView won't scroll to footer - uitableview

The problem might be related to this post iOS 8 Auto cell height - Can't scroll to last row but here the conditions are different.
I'm not using self-sizing, just a typical UITableView with fixed height cells. that you'd want for a Settings screen. However, I do add a footer and few other subviews below the footer of the UITableView. I do update the contentSize properly to take into account those added subviews.
Everything works fine on iPhone4/5 on iOS7 but the UITableView won't scroll all the way to the bottom on iOS8 although I do see the content if I try the hold+scroll trick. Any idea what's happening?
Thanks!

Related

UITableView Footer is not showing

enter image description here The Controller is UIViewController.
I have a UIScrollView in UIViewController. A Tableview is added as a subview upon the scrollview. The Scroll view content size is bigger than the screen size. There is a footer in the Tableview. When I am reloading the Tableview first time with the data then the Footer is not displaying but when I started the scroll then the footer is not displaying properly.
Could you please guide me, how to make this resolve.
Thanks
Firstly, it's wrong practise to add UItableview inside scrollview, because tableview already has scrollview underneath it and will adjust the content size of tableview automatically depending on the content you add.
Can you please let me know the reason why you have added tableview inside scrollview?
Remove tableview from scorllview and everything show work fine.

UITableview frame changes after scrolling thanks to Autolayout

I'm working on a application where I have a UITableView inside a UIScrollview.
The TableView will display current games players are in, its inside a UIScrollView. I dynamically add cells to the UITableView for each game, but when I scroll the UIScrollView, the tableview inside it snaps back to its size set in the storybuilder.
This is because of autolayout, when I disable it, it doesn't happen anymore. However I do like autolayout for other views in my app. So my question is, how can I fix this problem?
Maybe someone can help me get on the right track.
Thanks
EDIT
I think I must explain my situation more, I will use an image where I can display what is happening
Explanation
Before and after scrolling.
As you can see I use the scrollview because there can be many games, so you'll have to scroll down to see them all. The TableView is just to hold the data, scrolling is disabled on that. After scrolling the TableView that says "JOUW BEURT" snaps back to its size set in the Storybuilder. This is because of auto layout like I said, but I don't know how to fix this.
You shouldn't put a tableview inside a scrollview as a tableview itself contains a scrollview and causes issues just like you are seeing when you have a scrollview inside a scrollview.
Remove the scrollview and this should fix your issue. If you are wanting to put content above the tableview or where you scroll down to view the tableview cells etc, consider adding a tableview header view that is added above the tableview.
Why did you place UITableView inside UIScrollView?
Check below
Check your constraints of UITableView and UIScrollView
Placing UITableView inside UIScrollView is somewhat strange
EDIT
You will just need to remove the scrollview and enable scrolling feature of the tableview. that will fix it
UITableView is already a subclass of
UIScrollView

Mixing UIScrollViews and UITableViews

If you look at the Featured tab of the Apple App Store app on an iPhone 6, there is a unique UI layout that I can't figure out how to replicate.
At the very top there is a navigationBar. Below this there is a UIScrollView that animates through a number of featured items. Below this is what appears to be a UITableView with a number of custom programmed cells.
My first guess was that the UIScrollView at the top was added to a custom cell at the top of a UITableView. If you swipe up the UIScrollView moves with the objects below like it is a cell. You can see that the vertical scroll indicator starts at the top of the UIScrollView.
The part that is unique is that if you swipe down, the objects below the UIScrollView move down like a UITableView and the UIScrollView stays in place. This means that the UIScrollView is not a custom cell at the top of a UITableView.
I tried making this work a number of different ways but I can replicate this. Does anyone know how this can be done?
You can use a tableview header,the header is a scrollview
If you scroll tableview up,just use tableview default behavior,the header will scroll up.
If you scroll down,use UIScrollViewDelegate to calculate the tableview header new frame,and adjust it.So it remain at top
Not sure if I got you correctly, you may use UICollectionView as vertical scroll. Then, you create a custom UICollectionViewCell, each with horizontal scroll.
I haven't tried it though but done something similar to this. Hope you find a way!

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.

Adjusting the UiTableview hight in IB so the the table its able to scroll all the rows

I have a UITableView that is cutting off the last row and a half. I assume this is due to the face that I am using a navigation controller. What I can't figure out is how to adjust the height of the TableView so that it works on both iPhone 4 and 5's. If I adjust the height in IB to fit the iPhone 4, I have a large gap on the bottom of the iPhone 5. I would think there is some automatic way of doing this, but nothing I am trying seems to be working.
Auto Layout - Official Guide...
Also, if you're using a UITableViewController on the storyboard, this will solve your problem (with or without navigation controller, which is unrelated). If you're using a UITableView on a regular UIViewController, however, the best answer is auto-layout.

Resources