Random glitchy rendering of SVG on iOS/WKWebView - ios

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.

Related

Scrolling issue with fixed divs in iframe on IOS

I am having a problem with iOS scrolling on an iPad. Every other platform tested works just fine. I love iOS, but hate it too. I was able to get the entire iframe contents scrolling within the parent, but there are two DIVs that are fixed that shouldn’t scroll within the iframe.
Before I spend a lot of time trying to work this out, I am just looking to leverage everyone’s experience for whether it, in fact, CAN be done. If it IS possible, then I will proceed to trying to work out a simple model and report it back for others. If experience shows that it can NOT be done, then you will all have saved me a lot of headache, not to mention time.
Here’s a drawing of what works on all other platforms but NOT iOS:
Simple question: Is it possible?
The simple answer is, in fact, YES.

Weird behavior UIComponents

I'm newbie to iOS programming and I'm having a little trouble with UIComponents. I don't know why, but they aren't working properly. This images illustrates it:
It's weird because I've just drop the elements and in some cases, I change the font but not any big deal. As you can see, my labels and the "Register" button don't show up. The worst is that the log don't say anything, so I can't know what's going on. I cleaned the project, but it doesn't work.
Any clue what's wrong? It's not the number of lines or the value of alpha, I checked that
Thanks!

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.

Pasting 'tab' to a UITextView

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.

MonoTouch: MonoTouch.Dialog Rendering titles

In the below image you can see that in a StyleStringElement in a list, when scrolled quickly the title renders black. If I rotate the ipad the list re-renders and is fine.
Is there a work around?
Not sure what's the issue but it's been reported previously: Weird blocks when adding Elements to MonoTouch Dialog RootElement after it is shown
That might give you a workaround but it would be nice if you could fill a bug report (and a test case) on http://bugzilla.xamarin.com so this can be properly fixed in future releases.

Resources