xcode - how to fill a view within the bounds of main application - xcode

Im using Storyboard and I have a tableview that fits the entire viewcontroller.
When I run the app I get something like this in the footer of the app.
If you see the storyboard designer, the tableview fits the view.
So if you see there is like a gap between the bottom of the view so the tableview is not filling that gap.
Any clue?

Related

Xcode Storyboard - Table View doesn't expand automatically when dragged in

In Xcode 7.3, when I drag in a Table View from the Object Library to the Storyboard for a single view app, it doesn't automatically expand to the full size of the view. I seen it do that in my Udacity class videos and in other videos on YouTube. Is there a setting in Xcode that will correct this? Thanks.
Yes, you need to "pin" the tableView at the ViewController. Am I right you have a simple ViewController and add a tableView to it?
Now, you need to open the Pin Menu and uncheck the checkbox "Constrains to margins". Now you add the constrains to the top, left, right and bottom to 0 and save it. Now the TableView should stretch the whole display.
If you only show a table in the ViewController you should use a UITableViewController.

UICollectionView container inside of UIScrollView breaks scrolling in ios 9.1

I have one large scrollView that contains a collectionView and a tableView. Neither the collection view and table view scroll independently. Both are resized based on their content so the user is just scrolling a long view within the scroll view.
This has always worked out fine until ios 9.1. Now any attempt by the user to pan within one of the collection container views fails to scroll the outer scroll view.
Can someone explain what has changed in ios 9.1 to make this setup no longer work?
My problem was entirely related to this issue with LXReorderableCollectionViewFlowLayout

Overlapping cells in static tableview built using storyboard

All,
I'm using the Xcode 6 beta to build an iOS8 project using storyboard and swift. In the storyboard, I've created a Table View Controller as my primary view when the application loads and have added a label to the first cell and a label to the second cell.
The table looks fine in the storyboard, but when I run the application, the cells overlap. This is a brand new project with no other changes made or code added.
You can see both the storyboard and the running application in the photo below. Any ideas on what could be driving this?
Additionally, when I try to add a button to one of the cells, I get a grey box that covers 90% of the view.
I think I've had this issue. Try making some Auto Layout connections from the label to the Content View of the cell, and from the table view (and its cells) to the containing view, to force the views to be the proper size.
The following worked for me.
Control-click and drag from your label to left side of the cell it's in. When the modal comes up, check the box for 'Leading Space to Container'.
Repeat the same Control-click and drag process for each side of the cell, selecting the relevant Auto Layout option when it appears.
(Optional) Try to Control-click and drag from your table view to the each side of the containing view (if there is one), and repeat the steps from above.
Hopefully this works for you.

UIScrollView not scrolling after navigating back to view in ios7

I have a project I was working on in XCode 4.whatever where the main view is a Netflix-style layout with a series of horizontally-scrolling scrollviews. The main scrollview may be scrolled vertically to see all of the horizontal ones. This is connected to a navigation controller so when an item is touched it performs a segue, whereupon the user can click a standard navigation bar back button.
This was working as expected with XCode 4.*, iOS 6.1. I have now upgraded to XCode 5 and iOS 7. The scrolling works fine upon initial load - the main vertical one and subview uiscrollviews. After navigating to an item and touching the back navigation bar button the main view won't scroll vertically. The subviews that are visible still scroll horizontally.
I am using a storyboard. The master view controller contains a Scroll View as the top item and a View with a couple subviews for the feature section at the top. The horizontal scrollviews are added programmatically.
The master view controller is a UIScrollViewDelegate and I have connected an IBOutlet from the main scrollview to my master view controller .h file.
That it works initially and then stops scrolling leads me to believe that the content size is being recalculated - and set equal to the frame size - after the navigation. However, I tried setting the content size within viewWillAppear to no avail. I did verify the routine was being called after navigation.
Any ideas on why the main scroll view loses its scrolling?

How to use UIScrollView with ViewControllers from Storyboard

How would I use a UIScroll view (much like the main iPhone screen) with the page control at the bottom, pass UIViewControllers?
I have three UIViewControllers,that I would like the user to swipe back and forth. However these are already created in a Storyboard. I want the entry point to be the middle viewController and have the user wipe left and right to get to the 1st and 3rd view controller.
Am I right to assume that swiping is built into scroll view's with paging enabled?
Thanks in advance
-PaulS.

Resources