UIImagePickerController editing image black space on top - ios8

I'm presenting a UIImagePickerController that allow user to edit images, not doing anything fancy here.
Only on iOS 8, if you move the image down there's blank space between the top of the selection box and the top of the picture.
What might be causing it?

It's a well known apple bug... I have found a work around by changing the bool in .plist - View controller-based status bar appearance to 'YES'.
Be aware though, that doing so it'll have you changing any appearance code you have for the statusbar. If your app does not have any, this will be your perfect solution.

Related

Unwanted grey area when simulating iPad Xcode 11/SwiftUI

Question: Can someone identify why I am getting the extra grey area shown in my add item (top screen in screenshot) and how to eliminate it?
I have tried manually setting the size of the background object, removing and re adding constraints, clicking all the Xcode generated solutions for handling the autolayout errors shown below, setting the presentation setting to full size ala this answer all to no avail; it refuses to be consistent with the main menu screen (bottom)
Context:
Running Xcode 11...I have two scenes in a generic barcoding app, the main menu and the add item scene, and I am designing with iPad's in mind. With the size class for ipad pro 9 (wR hR) and set to landscape orientation, my add item scene has a huge amount of gray area bordering the visible content, unlike the main scene (though there is also a little grey area in portrait)
Figured out what was causing my problem; was using the wrong form of segue between screens, per this answer, in my case, a modal segue when I should have just been doing a show segue. Deleting and adding show segues with the presentation set to Full Screen in the destination views Attributes inspector did the trick.

How do I place text fields correctly within an animated UIView?

I am having problems with animating an UIView.
Everything is actually pretty basic:
My storyboard, because it easier to show a pic than to explain everything.
As you can see, there is a white UIView in the middle ( behind the gray label that says "Navi ein" ). It has to TextFields and one button in the right bottom corner.
I now added an animation to this UIView, so when the user clicks the button "Navi" (placed in the navi.-bar, top left), the UIView flys in from the top to the center (centerY-constraint and alpha animation, very simple).
The animation works for the UIView, but the TextFields and the button are not shown after it. My question is: why? I would really appreciate your help! :-)
Please let me know if you need some code extracts, but it shoudn't be necessary.
EDIT: I now found the text fields and the button in my View Debugger, I just forgot to uncheck "Only show displayed views". But how to figure out what makes them disappear (or not even appear) when the app launches?
View Debugger
I am so sorry! I just saw that I set all three items to hidden in my code.
I've never thought about that so far, I just looked in my storyboard.
So the problem is solved, I just deleted the lines "streetTextField.isHidden = true" and so on.
Nevertheless, I think it is good to hear and to see that some problems that seem to be hard are very easy to solve.

UITabBarItem grows when touched

I have a tab view controller with 3 tabs, custom icons. I used insets to enlarge them slightly and compensate for the lack of titles. All of this is done in the story board, the only code for these items is setting the text to "" since it always wanted to pick up the View title no matter what I set in the story board.
It look like this:
now, if I repeatedly tap a tab bar item, this happens:
It happens to all three, and it will keep growing if you keep tapping. I'm not setting the size, these are image sets and all I did was change the insets in IB
Any idea what's happening here? (Xcode 6.4 iOS 8.4.1)
I finally found an similar question here :
iOS Tab Bar icons keep getting larger
it seems that any inset that makes the image larger will be applied every time you touch it. It doesn't really make sense but if I use insets to only center the image and not enlarge it the issue goes away

Seeking a simple Mac OS NSTextView example using AutoLayout

After much reading and experimenting, I still cannot get a simple TextView to resize fully in the horizontal direction using Xcode 5.0.2 in Mavericks. It resizes partially as the window is resized, then stops with long lines wrapped around even though my containing NSScrollView continues to resize as expected (it has four default constraints and no horizontal scroller).
Can anyone point me to a simple code/IB+AutoLayout example, preferably just a window containing just an NSTextView dragged in from the IB template library --- one that works? The Apple TextEdit sample code is almost irrelevant for this purpose although it does resize horizontally quite well. Also, there is the clip view for which I can find little information.
Any other tips appreciated.
Thanks.
Answering my own question:
Turns out that my problem had nothing to do with AutoLayout and little to do with NSTextView. It was the textfile I was using to test my code! This file was composed of records with tab-delimited fields.
Turns out that NSTextView comes with a default NSParagraphStyle with predefined tab stops that end at character 56 whereas my test file had tabs beyond that. Therefore, my lines wrapped around at the last defined tab no matter how much I stretched the window.
After changing my search terms, I found what I needed at the following links:
Premature line wrapping in NSTextView when tabs are used
How to have unlimited tab stops in a NSTextView with disabled text wrap
Apologies for wasting bandwidth.
Not sure why such a simple thing does not work in your case, but nevertheless here's what I did in Xcode to get an NSTextView follow window resize:
Create a new project (not document based in my case but it doesn't really make a difference)
Drag a NSTextView from the palette to your window. Align all four edges with the window edges.
Open the "Add constraints" pop-up (second button from the segmented control on the bottom-right part of your IB view.
Each of the four spacing constraints should show a number equal to the distance of your text view from the container window. If you aligned them, this number should be either 0 or -1. Click the down arrow for each of them and select "Use Current Canvas Value". Do it for all four. Make sure no other constraints are selected.
Click on "Add constraints" on the bottom of the panel.
Run your project. Your textview should resize with the window.
Also, as Jay's comment mentions, make sure you do not have any "leftover" constraints in your view. You can check this either by observing Xcode's warnings, or manually by inspecting your view's constraints by going to the Size Inspector tab (4th tab on the Utilities bar).
If you need to have your textview arranged in a more complex layout, it might be worth taking a look at the AutoLayout Guide.

xCode 5: I'm getting a small translucent square on UIButton selection

If this is an Interface Builder issue, the solution has eluded me for days. I'm getting this weird translucent square on my UIButtons when they are selected, and I have no idea how to get rid of it. The buttons are not custom, they are "system" style buttons, and they are just simple rectangles.
I've tried changing every setting I can think of including "adjusts image on highlight" with no luck.
Here's a screenshot of the culprit (happens on both buttons)
And here are my button settings:
In my case, set the button type to Custom (in place of system) solved the problem. But I still don't know what is this strange blue square.

Resources