iOS 7 Custom UISegmented control has 1 pixel gap - ios

I have a 1 pixel gap at the end of my UISegementedControl which only appears in iOS 7.
I am not sure why this is appearing or how to resolve it. I would greatly appreciate guidance on diagnosing and fixing the issue.

I would approach this by making a new project with just the UI control and whatever other elements are relevant, to see if you can replicate the problem without other code.
What does it look like in the storyboard editor? I assume manually increasing the width doesnt fix the issue?

Related

Simple IOS Layout

I have been trying to do this layout for a few days now and cannot do it. I have no code as I have been only using Storyboard.
In my Android version I simply used a weighted LinearLayout where my title was 20% my relative layout was 60% and my custom object was 20%.
I cannot replicate this in IOS. Everything I try fails. I have tried everything and have tried using StackViews, EqualHeight constraints with multipliers and everything does not work. Most of the time nothing even happens and it just looks the same. Can someone please help me? I am so frustrated I am considering abandoning XCode in total and coding my app in React Native.
It's not really clear what you're asking. But if you want to use storyboards, it's pretty easy with XCode. You can set your layout visually, then simply use the "auto-resolve" feature (little triangle inside of bars on bottom right above the console) to: 1) "clear constraints" and then 2) "reset to suggested constraints". This is a fast and crude method that should more than enough to get started.

iOS UI elements are invisible

I work on a project for few days. All worked great until today. I've added few elements to view just like normal today. But when I launch app on device I can't see them. They are there: size classes works ok, everything is on right place. I can even touch UISegmentedControl and pick item on UIPickerView that makes the Picker View noise. But they are invisible - I can see only older elements.
I can't even tell where is the problem, because new elemts have THE SAME setting as olders. Methods like [_someElement setHidden:NO] does nothing.
Can you help me please?
Edit: they are visible in IB Preview
probably bug with cache, try to:
-delete all data from DerivedData folder
/Users/%user name%/Library/Developer/Xcode/DerivedData
-manually remove application from device/simulator
rebuild application
Thank you, I solved it after few hours, when I was focusing on another problem.
AVFoundatuon preview layer hide those elements. Simple solution is to bring them to the top as subviews.
Thank you.

Cannnot move scenes in interface builder of XCode 6.1

My problem is that I cannot move scenes after updating XCode to 6.1. They are quite distorted as u can see in a picture and I want to group them a bit. I know i can arrange them using source code of storyboard but may be there's simple way to allow just dragging them?
From what I see in your screenshot I think you just need to zoom in more, to be able to move them individually. I think its a little annoying.
Unless Its another issue, zoom in more you can do it by double clicking a few times

Xcode Storyboard textview error getting cut in middle

I have a strange error in Xcode 5.0.2.
I just made a new project with the tab bar template. In the views, there is a textview. It is for some reason cut in the middle (see pic below).
I also have same problem with other projects. I have not tampered with the project in any way yet.
Anybody has an idea why and how to fix it?
Thanks!
EDIT: extra screenshot
I was having the same issue. I noticed if I changed the View -> Mode from the default "Scale To Fill" to "Aspect Fill" it fixed the issue. Oddly, changing it back didn't cause the issue to resurface, so it definitely seems to be a bug with the interface builder in Xcode.
The error is known with Apple and merged with another BUG. Hope they will fix soon.
I had the same thing some time ago and asked here on SO.
In my case it was caused by Buttons with text, not text view.
I found out that the line of the horizontal cut was related to the vertical position of the otehr buttons.
I did not solve it therefore I deleted all UI elements from that view (only 3 in my case) and re-created them. That is, of course just a workaround but it worked. The app still works nicely.
After I did so SO user Bio Cho suggested the solution to change the text from plain to attributed and back to plain.. To late for me to try it, but you could give it a try. See UIButton Title does not appear or is cut - bottom most label only

Flash text disappearing when using draw method

Working on an AIR iOS app and noticed a strange thing.
In my app I have a navigation panel that displays over the main content-holding Sprite. Having this panel display was causing the app to crash on iPad1 (guessing too much memory). So I added a function to basically draw the content-holder Sprite (via BitmapData draw function) into a Sprite above it, and turn the content-holder visibility off. Basically, taking a screenshot.
However, I'm seeing on 2 different iPads now that any dynamically added text in the content-holder isn't being drawn. Sometimes, the first time it does, but not after.
One thing noticed is that turning off the cacheAsBitmap property of the text fields fixes the problem. Unfortunately, that is not an option as the app is very text heavy and the performance is noticeably slower if the dynamically generated text isn't bitmapped.
Any ideas on what may be going on?
Thanks in advance for any help.
-Mark
Looks like cacheAsBitmap on the dynamic text fields was the problem. By turning that off temporarily, taking the screenshot and then turning back on when done with screenshot, I was able to work around the issue.
Not sure if it's an AIR/iOS issue or maybe a lack of memory?
FYI, in case somebody sees similar problem. Hope that helps.

Resources