In the simulator I pasted into a UITextView. I wasn't aware I still had some objective-c code on my pasteboard, so the pasted text included multiple lines and some tabs.
I was surprised to see that the text field suddenly became multiline (it looked awful obviously, since the view is tall enough for only 1-2 lines).
I have also experienced in UITextFields that pasting in the same formatted text messes with my implementation of sizeWithFont:constrainedToSize: which I use to size some views correctly.
Can anyone shed some light on what is happening, and whether I need to code around this possibility? On the device itself, does the OS somehow handle the issue? I am also going to try hosting the same piece of text on a website to see if copying and pasting from within the device exhibits the same behavior.
I really hope it is just a limitation of the simulator and copying from an external environment.
Related
We are experiencing a bizarre intermittent (very occasional) render glitch when displaying SVG icons in our iOS app based on WKWebView.
When it does happen, it seems to be possibly tied to CSS in that if I change some random (even completely unrelated) CSS classes in Safari while debugging the page, the glitching can go away or come back randomly. There seems to be no rhyme nor reason to it though, and we don't have any way to reliably reproduce it yet.
Just wondering if anyone has any thoughts or may have encountered this before.
As you can see there are a couple kinds of glitches: the obvious garbled icons, but also there is only supposed to be one Metrics tab. That part is especially strange because the "Metrics" label is just text, not even part of the icon!
If I debug the element, it looks as it should in the debugger. The element has the right background image url and the label is as it should be (I can even hover over the label in the elements tree and it will highlight the label on the page, even though the text is completely wrong). It seems to get completely screwed up in the actual rendering somehow.
So we ended up finally solving this and it turned out not to have anything to do with SVG after all. The culprit was actually the CSS greyscale filter that was being applied, probably in combination with something else we were doing.
In short, removing the greyscale filter fixed the glitchy rendering.
Ive been looking around to find an answer, but all I can find is related to web scripting, so...
We are testing an app, and it seems that one user had "increased text size (from phone settings)," but the only texts that are actually increased are the cells of tableviews? I don't understand why the text are not increased in any other place (but I thank the coding god), since it is indeed increased in tableviews?
Anyway, can someone help me on how to fix this so that my tableviews hold a static font size?
Probably the developers set defined size for most of the labels. They should use system size to make it work properly.
I have been trying to make a font type app for iOS in Xcode. It alters the normal text into emoji and unicode type letters and there are several different font variations to choose from. Right now, every time a new font is chosen, it changes the whole text field to that one selected font. But I'm trying to make it so that it doesn't effect the whole text field when a new font is selected, only the words that will be typed from that point on. I would appreciate if someone could help me with the code that would allow this. I would think its very easy but just not sure what to do.
An example app that does what my app does: https://itunes.apple.com/us/app/textizer-fonts-fun-looking/id563544682?mt=8
An example app that does what i want my app to do: https://itunes.apple.com/us/app/better-fonts-free-cool-new/id735011588?mt=8
Thanks in advance!
***Edit: My question is different because others are referring to actual fonts in the code and program. My situation is totally different. This is a special kind of app and the "font" is actually unicode symbols which is all the same language to a computer. So im actually just trying to make xcode and the app change without clearing the last symbol effect on the keyboard. It just like normal typing, and would actually be normal if it didn't change after a new one is selected. Not sure why the whole text box changes to the font that is selected, but i would think that its really easy to just add a line of code that doesn't make it change all the letters. If you just checked my links you would easily be able to see. Thanks again and sorry for the confusion. All help and code is appreciated.
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.
I have implemented the syntax text highlighting as given in the question here (UITextView w/ Syntax Highlighting) - it's a great utility and works well when compared to some non-regex versions (such as the example documented here: http://www.a-coding.com/2012/03/syntax-highlighting-in-ios.html).\
Both implementations, however, give me the same issue. When text in the UITextView is automatically wraps (i.e. is longer than the current view allows) the placement of the caret when editing is incorrect - you attempt to start an edit and the caret appears in the wrong place and when you type the text you enter appears further up the text view than you would expect.
Can anyone give me any pointers as to where the issue might be occurring and how I might be able to begin fixing it? Thanks in advance to any input / suggestions.
You can see here that I have typed XXX at the caret but it has appeared further back along the line incorrectly http://i.stack.imgur.com/zUIhd.png
UPDATE: The issue seems to be firmly within the fact that the custom UITextView wraps (line breaks) in a different place than the standard Apple UITextView - I'm not sure why this is happening or what to do about it though.
Not a super answer but with the release of iOS7 this probably isn't how you'd do this now anyway, see a tutorial such as this one: http://www.raywenderlich.com/50151/text-kit-tutorial