Tableview not using all available space - objective-c

I have an IOS application containing, amongst other view controllers, a view controller with a UIScrollView and UITableView. This is launched with
self.storyboard instantiateViewControllerWithIdentifier.
I hope this maybe something simple, but I cannot get the table view to use all its available space, i.e. the UITableView has enough height for say 4 rows, but it starts to make use of scroll bar when there is only 3 rows in the table.
Regarding the scrollview, I have some horizontal content which is only 25 in height, but if I make the UIScrollView anything less than 110 in height or so, then the horizontal content will only appear partially on screen or not at all.
Xcode 4.4.1 on OSX Lion, IOS 5.1
Any help will be appreciated.

Fixed the problem myself (Trying to find a host to put some screenshots. Will update).
I set the Bottom Bar from Inferred to Tab Bar in the Attribute Inspector and it now works. Both the previously unusable spaces in the ScrollBar and the TableView can now be used. These space were both of the size of the Tab bar. Took a while to work this out, as even before this change, the tab bar was showing on the simulator, so I didn't think it was Tab Bar related.

Related

iOS 8 UISearchController's search bar is shifting down, If I click search bar

iOS8 Swift UISearchController hides navigationbar
I am facing same problem as in above link. So I have added following line.
self.searchController.hidesNavigationBarDuringPresentation = NO;
But now UISearchController's search bar is shifting down and some blank space is created on search bar's place. If I click cancel button, then search bar is restored to original position.
please help me to fix this issue in iOS 8 using objective-C.
For some reason (I believe this is a bug), UISearchController can place the search bar incorrectly on presentation if its frame coordinates are something other than (0,0).
To work around this, create a UIView where you want the UISearchBar to be and add the UISearchBar as a subview.
You might also be running into this bug: http://openradar.appspot.com/20942583

xCode - Why can't I see this object on the view?

This might be a silly question, but why in the world can't I see the the following button that I simply dragged and dropped to the view from the interface builder?
I am using Simulator iPhone Retina (3.5 inch) / iOS 7. When I try to scroll to the bottom, the scrolling ends and I cannot see the button that I placed at the bottom. Why is that? Thanks.
EDIT: I didn't do anything fancy. I simply created a new single view app, and then dragged the button to the bottom of the view on storyboard and then clicked run.
Storyboard simulate size of 4 inch display. When you run it on 3.5 inch display, content at the bottom of the screen will be clipped.
Just add constraints to attach button to bottom of the screen.

UIBarButtonItems are randomly resizing in bottom UIToolBar

I added a UIToolbar on the bottom a view controller in IB.
I added a few UIBarButtonItems, but it seems to randomly resize either when I click on one of the UIBarButtons or if I leave the view and come back to it.
Is there any reason why it is doing this? I didn't have this issue when I was running iOS6, but on iOS7, xCode 5 the words shrink and expand randomly.
Is there anyway to lock the size or fix this issue?
Thanks!

How do I fix empty 44px space in iOS7 view with ViewDeckController?

I am in the process of transitioning an app to iOS7. All of the views throughout the app have a 44px empty space at the bottom that appears to be for a bottom toolbar or something, but I am not trying to display a bottom toolbar. This space also exists on views that do have a bottom toolbar and the toolbar just shows directly above it.
The red space shown is actually a view behind the black view. No matter what size I set the frame of the black view to, the red space is always shown. I am also hiding the status bar in plist, so don't know if this is an artifact from that or if it has something to do with navigation bar as they are both normally 44px in height.
I have looked at the transitioning guide and haven't found anything that's worked. Any ideas to what could be causing this and how to fix?
UPDATE:
I have tried setting edgesForExtendedLayout = UIRectEdgeAll and extendedLayoutIncludesOpaqueBars = YES (also tried NO) with no effect. When I look at the subviews of the navigation controller it shows a UIToolBar as hidden, but shows it contains a frame in the exact area the view refuses to resize to even with autolayout constraints.
UPDATE 2:
This is actually a problem with ViewDeckController (https://github.com/Inferis/ViewDeck) and the way it sets it's center view bounds.
I believe it has to do with the UINavigationBar. Try toggling the following options in Storyboard and see if it solves the problem. Namely, the 'Extend Edges' options:
These options can also be set in code with the edgesForExtendedLayout and extendedLayoutIncludesOpaqueBars properties on UIViewController.
If you are transitioning to iOS 7, you should be using an Auto Layout constraint to anchor to the Bottom Layout guide. Control drag from your view to the Bottom Layout guide and choose Vertical Space from the popup menu.
Using frames in iOS 7 is harder and is the way of the past.
Auto Layout is hard to grasp at first, but it is very powerful once you get the feel.
This is actually a problem with third party library ViewDeckController (https://github.com/Inferis/ViewDeck) and the way it sets centerViewBounds for IIViewDeckControllerIntegrated. I was able to figure it out after changing to IIViewDeckControllerContained and seeing the view sized correctly.
In IIViewDeckController.m, just return self.referenceBounds for iOS7 like it does for IIViewDeckControllerContained.

ios7 - iPhone 5 giving white space at the top

Client has come back to me on projects saying they see white space on the top (they can't see the default things like time, wifi signal, etc) at the top.
This is happening when they installed iOS7 on their iPad.
Any idea why this is happening?
Note:
I have navigation bar as image. I hide the navigation bar and put navigation bar as an image.
Downvoters
I know this is not a perfect question for SO, but I thought to ask to take inputs. Tomorrow I am going to study on it.
try to insert following code into your viewDidLoad:
if( [self respondsToSelector:#selector(edgesForExtendedLayout)] ) {
self.edgesForExtendedLayout = UIRectEdgeNone;
}
Otherwise you could try it, by removing the UIStatusBar. Select your Project, go to the section General and select Hide during application launch inside the subsection Deployment Info. Next you have to add the attribute inside the Info section called View controller-based status bar appearance and set it to NO.
It's due to the status bar.
In your XIB or Storyboard chose to view your xib as iOS 6 :
On your view, add a Content View (you will add your outlets elements inside this content view) and add a Y delta of 20 (for the status bar) :
Now, if you compile your app on iOS 7 or iOS 6, your view will go up or down and you won't have the space anymore.