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

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;

Related

iOS webview height pin (xamarin or code)

I have a Xamarin iOS app that is created with a storyboard. The storyboard is set to view as iPhone 5. I have a webview as below that fits the screen fine. When run on an iPhone 6 plus, it seems to grow fine and fills the entire iphone 6 plus screen. However when used on an iphone 4, a web page will fall off the bottom of the screen... which indicates to me that the webview is too big.
I don't know why it seems to scale up but not down. I need the bottom of the webview to always pin to the bottom of the screen. How can I do this? I have tried the UI constraint icons but they never seem to work as expected. Can this just be done in code instead? Even in iOS objective-c would help as I can convert it to c#.
Any pointers would be great!!
It works on iPhone 5 and the 6 versions because iPhone6/6+ uses a compatibility mode. Resolution of iPhone 4 is smaller. Try single clicking the web view to switch to constraint mode (you'll see T and H shaped handles).
Drag the T shaped ones to the top, left, right and bottom border of the view controller's view. That will constrain height and with to the parent view's size.

UIView not resizing correctly

For some strange reason, every new UIViewController I add into my project is not resizing according to the screen.
As you can see here in Xcode I'm using Retina 3.5 Inch Full Screen and it's supposed to look like this.
But in the iPhone the lower part of the screen is not being shown. This is what I see in a real iPhone 4.
As you can see, the button in the inferior part of the screen is behind that white bar and I can't click it.
I've really tried everything and I don't know what I'm missing.
I'm also tagging Objective-C as this could be cross platform.
I fixed the issue thanks to Luca. I was using a component for a Menu Bar that made the screen not to resize properly to 3.5 inch. Removed it and now everything works.

UITableView size in both i0S7 and iOS5

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];

Black bar on IOS 7

I have an iPad app. When I used it in iOS 5 or 6 its working fine and the UI also seems to be fine. But the same in iOS 7 a black bar on top, bottom, left and right of the screen appeared. Including on the splash screen.
I had tried it by hiding status bar of all views.But I cant fix the issue.
- (BOOL)prefersStatusBarHidden
{
return YES;
}
Can any one know what is the reason?
The same thing happened to me as a result of downloading the latest version of Xcode
and all I had to do was adjust the frame of my view as it was altered during the download. It's so simple I didn't even think to try it.
How big are the bars? Is there any chance this is actually an iPhone retina app and this is iOS 7's new automatic scaling for the iPad's bigger display instead of the old '2x' mode?
Also, does it behave like this in the simulator and if so, can you post simulator shots of it running under iOS 6 and iOS 7?
See here for what I mean : http://www.iphonehacks.com/2013/07/ios-7-uses-retina-assets-of-iphone-only-apps-on-non-retina-ipad.html

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