Unicode characters being drawn differently in iOS5 - objective-c

Setting the title of a uibutton to u25C0 causes it to have a blue background in iOS5 but not in iOS4.3.
Strangely enough setting the title to u25C2, 2 characters a head in line, appears as expected. Go fig. I will be attaching an image later.
As a side note is this blue button currently in use in any Apple apps?
Thanks.
Left : iOS 5
Right : iOS 3.2
This was done by setting the title to the unicode character stated earlier.

You can try to use Unicode6.1's variation selector. For about Emoji, adding "\U0000FE0E" to specify non-coloured glyph.
For example, for about left-triangle(U+25C0), you can specify like #"\U000025C0\U0000FE0E", and that changed glyph from Apple Color Emoji style to non-colored plain emoji, at least on
iOS6 simulator on Mountain Lion.
Swift 4.0
let glyph = "\u{000025C0}\u{0000FE0E}"

You need to set the font appropriately. The blue icon you're seeing is U+25C0 in the Apple Color Emoji font. I'm not sure what other fonts on iOS include the symbol you want, but if you find that font and set it explicitly then it should render the icon you want.

Just found how to achieve this without code. Open Symbols&Emoji panel by clicking near your country flag in top right corner of OSX screen.
Type symbol you wanna find
Double-click on symbol you found
You will see it appear in text filed
Press Enter and you will see emoji in Xcode IB
Type "variation" keyword in search field
Double click on variation selector symbol
Sure it is "VARIATION SELECTOR-15" exactly
Nothing will changed in textfield (don't worry)
After pressing Enter Xcode IB will changed to flat emoji!

Related

Objective-c UITextView detecting texts

I am using UITextView on my project. TextView detected texts for Address and Phone number and links.
But some detects is Green color is some detects is underline.
I hope to remove this only underline, No texts.
Please help me,
enter image description here
enter image description here
Uncheck the following things in UIStoryboard,I believe this should work

"Selected" style of textfield

I am evaluating Codename One for our product and struggling to do one simple thing.
I need colour of border and text of textfield to be blue when field is focused or when I am typing in some text. However, field absolutely behaves like Pressed instead of Selected. So when I'm tapping on the field the style is correct, but when and releasing my finger from that field it turns into Unselected style.
See screenshots of my builder:
You can see that even in preview it's not blue for some reason, same in preview on the right, simulator, and on real device (iPad).
Selection on touch devices is only rendered when the user actually touches the device and hidden when there is no interaction. You can disable that behavior but that's probably not what you want to do and isn't the convention on touch devices such as iOS devices.
In order to make it work I had to set includeNativeBool constant to false. Style is shown correctly on real device, but in Simulator text still is black instead of colour that I set.
UPDATE:
As Shai advised unsetting of includeNativeBool is not a correct solution even though it changes behaviour. Setting of pureTouchBool to false is a right way to go.

NSTextField vertically misaligns text when using non-default typeface

I am having trouble making text fields look acceptable when using different typefaces.
See this screenshot taken from a test app I made to demonstrate the problem. It consists of a single XIB, with no code in the delegate or anywhere else. This is on OSX Mavericks with Xcode 5.1.1 but I haven't tried on other versions.
The default system font looks fine in the top text field, as you'd expect. Compare this to the one below: same exact size and shape, all I did differently was change the typeface in Interface Builder. Text is pushed downwards, and descending letters (lowercase pqjg) are clipped. The Menlo example below is also pushed downwards, though not quite as badly.
How do I fix this?
A quick test shows Lucida Grande and Helvetica require 17 pixels, and Menlo requires 19 pixels:
Note that this excludes the border and shadows, so you need your text view to be significantly larger than that to guarantee it will fit.
Interface Builder has been specifically designed for Lucida Grande, it knows it can get away with being too small because that font doesn't use all the space it has available. Doesn't work well with other fonts.
You can resolve this a couple of different ways:
• Enable "Uses Single Line Mode" on the Text Field Panel. When I first
encountered this issue it wasn't obvious that this would automatically
align the text vertically within an NSTextField.
or...
• Simply adjust the size of the NSTextField using the adjustment boxes
that appear after you click on it. You can also adjust them through
the "Control" properties.

unknown pattern color for the background color attribute

Getting the compiler warning:
Unsupported Configuration:
Unknown pattern color for the Background Color attribute
on my xib when trying to set the background color of a UIView to clear in interface builder. I swear I've made a UIView clear in the past without any trouble. Google isn't giving me anything useful. I feel like there is a head-slapping-simple answer here but after 14 hours at the keyboard (not on this issue) my tired mind isn't figuring it out.
I had lot of problem with the same issue. I solved this by this way
"select the UIView in interface builder, background color first set default color in option and build it".
I started getting this warning after updating to Mavericks and Xcode 5.1.1
I read elsewhere that the clearColor was the cause of this warning but in my case it was a pattern very similar to the standard Apple dark grey style background you see after updating an iPhone. No idea how it got there, don't remember ever asking for a pattern rather than a color nor how to select a pattern in the color selector popup. Perhaps it was chosen by IB because something in my original code was missing.
I changed it to Default, rebuilt and the warning has not returned. The only problem was going through each UIView until I found the one causing the warning because the background preview dropbox control in attributes is tiny.
Once aware of it, the pattern can be seen instead of a color
This is going to be a compile time error in XCode 8 (beta). Storyboard wont even open.
So we need to open storyboard in editor mode in XCode 7.x and search for "pattern" text and find the view as suggested by #Gordon Dove and fix it by changing the pattern to a plain color.

Xcode 4 Interface Building Font Not Updating/Showing

When I am changing the font of a label to anything other than the default, the label's font never changes. I can change the font size but not the displaying font. However, when I double click on the label, I can see what the label's font would look like. Can anyone help me with this?
Not all fonts are available on the iPhone. If you are setting the font to an unavailable one, it will default to helvetica. Search the net for a list of the fonts you can use.
You can reference http://iosfonts.com/ for fonts available for each version of iOS. Fonts outside this list will appear as Helvetica, as jrturton said.
I would suggest expanding the size of the text box, by dragging its outermost edges? Despite having made your changes if the selected font/font size combo is to large for the text box to handle it will remain smaller than what you selected even though when you go into the highlight view it appears correct
Edit
Just Because its in that font selection tool does not mean it will show up on the device