UITableView size in both i0S7 and iOS5 - ios

I am having trouble getting my table view to size correctly on 3.5 inch iPhone between the two iOSs.
I have a tabbar (native). I cannot use auto layout because its not compatible with iOS versions < 6.0. So Xcode tells me.
If I size for iOS 7 it gets cut off by the tab bar so i move it up but then it is in the middle of the screen for iOS 5. and visa-versa. Not to mention when I go and try it on a 4 inch screen.
The Autosizing Attribute in Xcode IB seems to be no help either. (Not the checkbox the lines)
In the pic below this is set for iOS 7 running it on iOS 5. If I move it to the bottom of the black, which is not the bottom of the screen, it will be underneath the tab bar when ran.
I have played a round for some time with different configurations but I cannot seem to hit it right. What am I missing?

You have 2 choices.
Either set the tab bar translucency to NO
if ([self.tabBarController.tabBar respondsToSelector:#selector(setTranslucent:)])
[self.tabBarController.tabBarController.tabBar setTranslucent:NO];
or put this in your viewDidLoad in your controller
if ([self respondsToSelector:#selector(setEdgesForExtendedLayout:)])
[self setEdgesForExtendedLayout:UIRectEdgeNone];

Related

screen breaking in iPhone x for higher iOS versions.there is no storyboards design done through code

In my project tabbar(it's like below the navigation bar i have 4 buttons in my tabbar) is going to top after app launches it's happening in iPhone x for higher iOS versions.we are not using storyboards,design done through codeing.check below screenshots.
In the first screenshot u can't see search bar and above tabs[location,search,deals this is the problem.
if u observe second one u can see address bar and above tabs for lowerversions it was working.
This is breaking screen for higher versions above ios11
This is for lower versions design is fine

iOS App is offset from the top of the Screen

I am developing an app (objective c) with a navigation controller. For some reason the whole app is offset from the top of the device. See below, can anyone give me some pointers as I have no idea.
Hiding the Navigation bar makes no difference, either in the storyboard or in code. The storyboard constraints all seem correct, as the title below the navigation bar moves up and down when showing and hiding the navigation bar.
This problem occurs on iPhone SE and iPhone 7, the iPad 2 is ok. The xCode version is 8.1
Any help would be appreciated.
You need to use launch.storyboard in your Project or you need to add launch screens image in your Asset Folder for all the sizes, then this black screen from top and bottom will be removed.
In App Icons and Launch Images setting, you need to set asset and launch screen file. so this black bar will disappear.

Some Part of the Outlets are Not Showing While Running on Different OS Versions in iOS

I Have Developed an Application. In that one i Added a GMSMapView and also Two Buttons at the Bottom. If i run this Application on iOS Simulator Version 7.0 all the outlets on the XiB are Visible. But If i run this Application on iOS Simulator Version 6.1 one of the Button is not Visible. Can any one please tell what is the Reason why it is hiding one button if the Height of the Device is Same.
You can use delta value that will effect the layout for the ios 6 not to the ios7
if you are set view as ios 7 in interface buinder you need to decrease you y position show image below
-64 delta y because you use navigationbar at top so it's size 44 and +20 for status bar

I get different view drawing in IOS SDK 5 from SDK 7

In The attached screen shots the code is the same.
The only differennce is - one was built with iOS SDK 5 (which shows OK) and the other with SDK 7 (which is presented on the screen with offset - BAD).
The screen output in IOS7 has unwanted vertical offset. The blue rectangle area in SDK5 is painted over in IOS7.
How can I have the same screen output the same in IOS7 as it was before?
You should try to fix this with with the Extend Edges settings.
Your content vc should have something like this settings (in the IB):
The same can be done in code:
self.edgesForExtendedLayout = UIRectBottom;
self.extendedLayoutIncludesOpaqueBars = YES;

UIView not resizing correctly with UINavigationController in iOS 7

I encountered a strange behaviour of a view in an iOS 6.1 app which I tried ran with the iOS 7 beta 2 and on my iPhone.
This app has a UINaviagationController which works fine if I run it in the iOS 6.1 simulator. However, with the Xcode DP the bottom part of the view is cut off. See picture.
Does anyone know how to fix this? I am drawing the box that you see as cut off on the bottom (self.frame.size.height) of the UIView which is managed by the navigation controller.
Thanks.
try subtracting the size of the box by the amount of the toolbar at the top. When using the self.frame.size.height, it will use the entire height as the location on the view, so when subtracting by the toolbar/navigation bar, it will raise that up just enough to fit the entire box onto the view
//clearly not objc but its just to show you how to implement it
boxLocation at (self.frame.size.height - (amount of toolbar/nav bar))
Hope this helps!

Resources