iOS 7 status bar supposed to overlap content? - ios

I have recently updated my XCode to 5.0.1 as to be able to test my application on iOS 7.
Everything seems to be working as expected, but for some reason the status bar is overlapping the screen's content.
Now, I am still able to see the overlapped content as the status bar in iOS 7 is translucent, but it looks very weird.
I could always move my content down a bit to compensate for the height taken up by the status bar, but how would that look in iOS 6??
Is this intentional on Apple's part? Is there a standard procedure we as developers are supposed to follow to get this looking how it should?
Also, should I just add 20 pixels (or whatever the height of the status bar is) to the top of my view and just forget about iOS 6?

I have decided to just set my Top Space to: Superview to 20 (the height of the status bar) for all my parent views.
Looks good on iOS 7 but there is a 20pixel gap on iOS 6, and given the fact that 80% of our iPhone users have already updated their OSes to 7, I think it's safe to just assume that eventually everyone will be using iOS 7 and support for iOS 6 will no longer be needed.
I'm not gonna break my head anymore over this.
Thanks anyways!

Related

Screen Shift on UIInterfaceOrientationLandscapeRight

I've got this application mainly displaying photographs.
The app was originally written for iOS 3.1 and upgraded to 4 before beeing published. It was not touched ever since. Now that the owner of the API appied some changes which ain't as compatible as they thought, I am forced to update the app. So I'll have to go for iPhone 5 and 6 and 6+ and iOS 7 and 8 updates in one go.
I observe this behaviour in the simulator of iphone 4, 5 and 6+ dimensions.
Portrait looks fine.
Landscape left looks fine too.
Landscape right is screwed up. Apparently it looks as if the whole screen were shifted to the left.
This is strange because I am not aware of anything that I would do different for landscape right or left. All I am doing is differnicating between any portrait and any landscape orientation.
It worked fine in the old version. But frankly I cannot reproduce this any more because I don't have access to the old xcode and sdk versions. But the app is in store for years and works fine on modern devices and modern OS versions.
A bit more background info, just in case it is of importance:
The app is based on a UITabBar, but it is not visible in this view.
The image is scrollable. It is placed on one view three times of the size of the screen with preceeding and succeeding image views place to the left and right respectively. This view with the three images is placed within a scroll view of the size of the screen or window respectively. This concept still works file, it is just shifted.
When I check the view item's frames in debugger or with NSLog, they all seem to be right, starting at (0.0/0.0) or respectively.
The view on the bottom with the four buttons that navigate to related functions and their view controllers, is re-alligned programmatically on each rotation, as well as the overlays with the textual information. All works as it should but it's shifted in this one orientation.
Well, all views are layouted programmatically on each rotation.
There are no constraints defined.
iOS6/7 deltas are all set to 0.
The app "wants fullscreen". By tapping on the image all UI items disappear and re-appear on the next tab. (Just by setting the .hidden attribute. Except for the navigation bar. Thats managed using setNavigationBarHidden:animated: with YES on animated) Works fine, even in the shifted view.
I am running out of ideas.
While I put all the details together for the question, eventually one idea came to my rescue.
The issue is related to hiding the tab bar. I could not use the regular way of hiding the tab bar because then it would not re-appear when navigating down to the functions that are associated with the buttons on the bottom overlay view.
Therefore I did some sort of hack. I did not hide it regularily but moved the tab bar out of the screen.
AND: This was the only thing that I did differently for landscape right and landscape left. I just searched for the constant names and found it.
Apparently, manipulating the tab bar view had a flaw in older iOS versions. (Or in older SDK versions, I am still working on that important detail)
To overcome the flaw the tab bar view was modified this way for landscape right:
[self.tabBarController.view setFrame:CGRectMake(0-kTabBarHeight,0,width+kTabBarHeight,height)];
This does not seem to make sense but did help me out a lot on similar issues years ago when the app was written.
Now, I changed this to:
[self.tabBarController.view setFrame:CGRectMake(0,0,width+kTabBarHeight,height)];
which is the same for landscape left too.
For the time beeing I separate between iOS versions >= 8.0 and smaller. But I'll double check that with older devices and may get back to this answer later.
I leave the question posted because I found the original "hack" here on SO too, so that I guess that others will have the same issues when updating to ios 8 or SDK 8 respectively.
Thanks for listening.

Xamarin iOS iPhone 6 Plus Not Filling Entire Screen

I have a default existing project in Xamarin.Forms version 1.2.3 and I have the same issue as reported here hinting that auto-layouts should be used.
When I start the iPhone 6 Plus app, there is about 1cm black bar at the top and bottom of the page, with even the task notification bar at the top moved to the smaller size screen displayed when launching.
Its probably a one liner change but what and where does this need to be done?
I'm rather surprised this is not in the default template already however.

iOS 7 content shifting up by 20 points due to transparent statusbar

Ever since I have upgraded to iOS 7, all my content have shifted 20 points up, and I cant seem to get this fixed. I have looked elsewhere on ways to shift the content down, from adjusting the window, to the view, but none seem to affect the content views.
Can someone please tell me what to do to get the views shifted down.
Here are some screenshots:
Notice the window red background colour showing through at the bottom:
Notice how the pattern repeats at the bottom of the login page:
If your project doesn’t use Auto Layout, issues caused by the status bar differences between iOS 6 and iOS 7 can be resolved by using Springs, Struts, and iOS 6/7 Deltas.
Solution for you is to move the content down by 20px but the content wasn’t under the status bar in iOS 6.
To remedy this, use iOS 6/7 Deltas to set a negative Y Delta, equal to the number of points that we moved the content down for iOS 7. For example, if we moved content down 20 points for iOS 7, then we set a Y Delta of -20 points.
Follow this link
to get the correct direction as per your code.
Hope this will help you a lot.
Good Luck.
Could be the result of the translucency in iOS 7. Can you try the code below in your ViewController
-(void)viewDidLoad {
[self.navigationController.navigationBar setTranslucent:NO];
}

Keeping UIStatusBar out of the layout before iOS7

In my iOS application, Status Bar is normally hidden (on start of the application too).
In some parts of the application I make it visible.
On iOS6 and iOS7 layout works perfectly and Status Bar overlaps any views on both iOS versions (I already want it to overlap, so it is OK).
However, I noticed that while on iOS6 and while the status bar is visible, if I rotate the device (my application supports every orientation), the layout is shifted down because of the Status Bar and I can not fix it after that point.
What am I doing wrong? How can I make it overlap the views on rotation change too?
The solution was obvious though it can be forgotten. (like in my situation)
self.wantsFullScreenLayout=YES;

ios 7 support for existing iPad app

I have existing iPad app supporting iOS 5 and 6.
Can anybody help me to list down item that I need to take care while supporting iOS 7?
One thing I noticed that in existing code ((UITableView*)self.superview) in UITableViewCell doesn't work. superview of UITableViewCell is UITableViewWrapperView that need to be fixed in existing code.
The things are:
1. Navigation bar height and view style are different
2. Status bar is transparent in iOS 7 as in iOS 6 it was opaque.
3. Small thing is about the tint color. By default it is light blue in iOS 7.
4. Button borders have been removed.
Issue's i have faced while running the app in IOS 7.
Status bar issue (view controller get overlaps 20 pixel.)
FixForStatusBarIssue
Customize alert view won't work in IOS7. (We can't customize the alert view in IOS 7.)
My Fix -> You need to customize the view exactly like u want because you can't customize alert view in IOS7.
Issues related to threads.
My Fix -> Use dispatch_queue(GCD with delay) in case of UI not responding (Presenting a view controller from background thread.)
Zbar sdk memory leaks while presenting and dismissing the SDK (more than 5 times app getting slow.)
FixForZbarMemoryLeakIssue
this are the issues i have faced. fixes i have suggested working fine for me. You just use it if you need hope it will work.
Apple's iOS 7 UI Transition guide
Read descriptions of every single element you used in your app.
And be aware of the style and position of the bars (navigation bar/tab bar/tool bar...).
iOS 7 has changed a lot in view hierarchies, you can use Reveal to make things easier.

Resources