Xcode 8 storyboard view controllers all blue background - ios

When I first created my storyboard all the elements on each UIViewController showed up just fine; however, after opening up my storyboard again the view controllers have turned all blue.
Is this some kind of issue with Xcode or is there a setting that turns my view controllers blue?
I have checked each subview's (UIViews, UIImageViews, etc.) tint color and background color.

I think you have to tap each of them to give them the tabbar icon, then it will become normal

Rashwan here says that having to add an image, while a good thing, is also a Xcode 8.0 bug that it turns your entire screen blue.
I added an image to the tab bar and it make my screen visible. However, the area where I added an image in the tab bar is now blue and it doesn't display properly when run on the simulator.
I think the solution is to upgrade Xcode past 8.0.

Related

Xcode storyboard is masking uitabbarcontroller elements with blue colour

When I launched my project, all the uitabbarcontroller views are covered in blue. I didn't set the background to blue in code or by using the storyboard. And all of the elements that I add onto the storyboard go behind this mask.
Here is what it looks like. What could I be doing wrong?
Using Xcode 10 and Swift 3.
This is a bug in Xcode 8, when you add an image to your tabbar item the blue area will be removed for that specific viewController. So add an image to the tabbar item and the blue mask will disappear.

UIPopoverController iOS 8.3 - UIBarButtons and UISegmentedControl not shown after dismiss

In our app when we present a UIPopoverController, after we dismiss it, if we navigate to any other screens that have barButtonItems or segmentedControls, these are not showing but they are intercepting the touch, so tapping on them works.
Even when we navigate to a new UINavigationController, it still doesn't work.
The navigationBar is visible, but the buttons or the segmentedControls on the view controller's view are not.
The weird thing is that if I enable Color Blended Layers I can see the buttons / segmentedControl.
It happens on multiple screen in our app where we have bar buttons or segmentedControls.
It happens only on iOS 8.3 (we build the app with iOS 8.3 SDK). We tried both presenting the pop over programatically and using the Present as Popover Segue.
The same code works on iOS < 8.3.
Has anyone encountered this issue?
I have attached some screenshots.
I found the issue.
It seems that the tint color of the UIWindow(blue) was overriding the tint color of the UINavigationBar (white) so the UIBarButtonItems were actually blue.
I was setting them both in AppDelegate using UIAppeareance.
The solution was to avoid setting the tint color to the UIWindow and set it directly to the UIView subclasses that I was interested in (UITableView and UIButton)
I have no idea why this happened only after I dismissed the popover and only in iOS 8.3

I don't see bottom bar buttons...(using Xcode 5.1.1)

So I was editing a project of mine today, and I when I was running it I suddenly realized that the bottom bar buttons don't show at all. It used to in previous builds. I even put together a simple example and ran the product in the simulator -- no bottom bar buttons or bottom bar!!! Here's what I want to see:
https://dl.dropboxusercontent.com/u/10838242/xcodestoryboard.png
But that bottom bar doesn't show.
What's going on here? I even set the view's bottom bar to "opaque toolbar." It just doesn't show. Using Xcode 5.1.1 -- is this an issue with this version of Xcode?
Here's the super-simple project:
https://dl.dropboxusercontent.com/u/10838242/Test2.zip
In the "super-simple" project, it's because your navigation controller's Shows Toolbar is turned off (in the storyboard).
Check that checkbox and run the project; the bottom bar will now appear (I tried it so I know it works!).
I can't comment on Matt's post (which is correct), but in addition to his "Shows Toolbar" toggle, you can specify what kind of toolbar you want in the app from the navigation controller in the storyboard (i.e. opaque toolbar, translucent toolbar, translucent black tab bar, etc).

Gradient appears behind navigation bar after app launch

When my app is launching, as soon as the launch image is replaced by the initial view, a white gradient appears behind the navigation bar for one second (1st image) then disappears (2nd image).
I've tried to change the initial view to a different one to check if it's adding that gradient but it's still being added even with a plain UITableViewController.
Any clue or ideas on what might be causing this gradient during the transition from the launch image to the initial view?
update the viewwillappear method to set the navigation bar translucent
set
navigationbar.translucent = NO
Apparently this was a bug in iOS and has been fixed in 7.1

UISplitView with UITabbar

I have a strange one that I can not seem to fix. I am currently working on updating my app to iOS7. This all worked in iOS6. It is an universal app and thus uses same xib files. However the iPad uses UISplitViews on some. Like I said, this all worked in iOS6 oh this all works on the iPhone too.
The problem is a grey bar at the bottom. I changed the tab bar to be opaque to move views up properly as i had some UI clipped to bottom of views and that went underneath the tab bar, sidetracked there. But if i set it back to translucent bar, it goes underneath but stretched properly. if i dont, it adds a bar. Other tabs work fine when NOT using splitview.
The UISplitviewController is added programmatically.
See attached image for better description.
This I have tried:
Added autoresize on splitview
Checked xib for subviews in the splitviews to have auto resize
Tried to force splitview to be screen bounds
Removed clips to bounds on all views
Removed autoresize subviews
Any ideas would be welcomed.
Thank you all.
UPDATE:
setting the background colour the uisplitview, it does colour the bar black. So the uisplitview is definitely stretching to it.
I subclassed UISplitViewController and added the line below to viewDidLoad and that fixed the grey line.
self.extendedLayoutIncludesOpaqueBars = YES;
I believe I have found an alternative solution for you. I have had the exact same problem, mostly because we are both doing something against Apple's Guidelines which is having a SplitViewController nested within a Tabbar controller (SplitView should be the root view). This was okay in iOS 5/6, but now in iOS 7 there are far too many side effects to achieve this.
The reason you see your view stretch completely when you set the bar to be translucent is because the bar is NOT taken into account when drawing the view. When you set translucent to false, it is then taken into account of the view and you will see that grey bar there because that's your view pretending there's a tabbar at the bottom of the screen.
And as always, a SplitViewcontroller's height cannot be changed, as it is determined by the visible window height.
I tried everything you did and then some. The real solution came from using a third-party Split View Controller.
I recommend switching over to https://github.com/mattgemmell/MGSplitViewController . This split view controller is actually one large View with container views living inside of it. Because of this, you avoid all the side effects of putting an actual split view controller within a tab bar.
If that doesn't float your boat, you could create your own solution which follows the same idea of having one UIViewController with two container views contained in it, though the people behind MGSplitViewController did a good job of that already.
This was the only way I was able to solve this issue, let me know if you find an alternative.
Instead of creating a subclass for UISplitViewController, I just added this code on my master's viewDidLoad:
self.splitViewController?.extendedLayoutIncludesOpaqueBars = true
For the controller that is the detail view of UISplitViewController you just do this:
-(UITabBarController*)tabBarController{
return nil;
}

Resources