keyboard splitting hangs in opengl app - opengl-es

I have OpenGL application with UITextField in the main menu. When I tap on the text field the keyboard appears and I can edit the text. But if I running under iOS 5 and if I try to split keyboard then the keyboard starts splitting (I mean animation) and then hangs when I release my fingers. I mean it hangs on half splitting - and does not responds more. But my app is still alive - and render is working well - background animation is still working.
I have just made a simple test - have disabled the render at all. And the problem has gone. So the problem is related to OpenGL.
I use OpenGL ES 1.1,
XCode 4.2 and iOS SDK 5.0.
Do somebody have similar problems? Any suggestions?
Please help.
UPDATE:
I have just tested two more games from AppStore - and in one I have found this problem too!
'Roads of Rome HD free' - iPad game.

I've encountered this problem too, but I was able to fix it due to previous experiences. In one application we found that if we keep our GL view active while playing video, the video playback position slider didn't behave smoothly. The same seems to happen with the keyboard split. If your problem is the same as mine, the issue is related to the keyboard split animation not finishing (and, in our case, the point where remained struck varied with each test)
We solved the issue stopping the animation on your GL view (I bet it's called EAGLView) when receiving a UIKeyboardWillChangeFrame notification and starting it again after UIKeyboardDidChangeFrame.

Old post, but I just came across this problem in ios 8 on an iPad3.
Running an OpenGL app at 60fps seems to throttle the keyboard update. Reducing your FPS while the keyboard overlay is active will fix the issue.
I'm using GLKViewController to manage the update and Draw callbacks with a 60fps refresh, but that was causing the keyboard split to lock up half completed.
I found the best solution for me was to set the view's preferredFramesPerSecond to 20 while receiving text input, and then set back to 60 after the textView is closed. As well as fixing the keyboard hang, it also just makes the keyboard generally more responsive.
myViewController.preferredFramesPerSecond = 20;

Related

Xamarin Forms buttons stop receiving mouse clicks after clicking on SkiaSharp CanvasView on iOS

I use SkiaSharp canvas to draw the main game screen, and then there are various Xamarin.Forms Buttons around the UI. This all works fine on when used directly on iPhone or iPad using a finger. However, when I connect a mouse (e.g., through a MacBook or otherwise), the buttons start working with about 10% chance after mouse-clicking on the SkiaSharp canvas (and not receiving the mouse click events with 90% chance). The SkiaSharp canvas itself works just fine.
If I bring up the iOS app launch menu from the bottom (which probably somehow temporarily exists the mouse navigation on the app), the buttons start working again with the mouse. But if I click the SkiaSharp canvas again with the mouse, the buttons have a high chance of becoming disabled again. If I change to using a finger, all works fine (even if the mouse clicks were not being registered immediately before). However, mouse clicks are not being registered even after touching with a finger, so finger-touching does not reset the issue with the mouse (but bringing up the menu from the bottom does).
We found this bug by testing the iOS game on MacBook Pro (the iOS apps recently came available on the App Store) but the same issue persists also directly with an iPad / mouse combination. It seems to be some sort of an issue between using a mouse (on iPad or on MacBook Pro), SkiaSharp canvas and Xamarin.Forms buttons.
Does anyone know what the root cause of the problem is and what is the workaround?
Not an answer as such, but some more information about reproducing the issue: A simpler repro case may be this small project: https://github.com/jrc14/TraceMatching/ .
Don't worry too much about what it's doing, but note that you're mean to click in the grey Skia canvas in the middle to create 'targets' - and that after you've done that, mouse-clicks are getting lost.
If you run it on a Mac, you'll see that, though the clicks get lost after you've clicked on the Skia canvas, they will start being received again if you click on something else (another app, or the Mac background).
(further edit) - after some noodling around I did find a workaround. If, once you've finished processing the touch action on the SKCanvasView, you reset its EnableTouchEvents property (i.e. set it to false, then back to true again), it seems that the clicks don't get lost any more,

Metal app on macOS lags when for example using the menu

I'm playing around with Metal and MetalKit on macOS. It works fine for the most part, but in everything I've built so far the rendering will lag for a brief moment when I do things in the menu bar or hover my mouse over the dock. It's kind of annoying.
The easiest way to reproduce this effect is by trying Apple's own 'Device Selection and Fallback for Graphics Rendering' Sample. I've observed the issue on macOS 10.13 and 10.14.
Does anyone have an idea how to fix this issue?
Core Animation won't lag like that, but it's not suitable for what I would like to do. I believe it's built on top of Metal these days though, making me believe that it should be possible to get rid of the lag.

Xamarin Image tap gestures are not always recognised

so we are developing an app on cross-platform Xamarin. We are now testing it on Android on a few real devices, and we noticed that wherever we have an image with a Tap Gesture Recognizer the tap does not always work.
We tried increasing the section by increasing the image's size and decreasing the used part of the images, but we still have this issue. Its like some times it just doesn't work, even if you did tap on the image.
How can we fix this?
Edit
We updated to the last pre-release of Xamarin.Forms (2.5.0.121934) and it seems to be fixed. We are going to continue running tests to confirm.
Put a hotspot over it or behind it setting image's input to transparent. Hotspot can be whatever works best for you, transparent boxview, contentview etc. It's sometimes better to use hotspots as you can allow users to tap a bit around the image etc.
We updated to the last pre-release of Xamarin.Forms (2.5.0.121934) and it seems to be fixed.

Scrolling in Microsoft Remote Desktop on a Mac w/ Magic Trackpad 2

I'm experiencing wonky behavior using a Mac to remote into a Windows 7 PC using Microsoft's Remote Desktop app for the Mac, and using a Magic Trackpad 2 as my primary input device. The problems arise primarily when scrolling in various applications in Windows. It appears the Magic Trackpad is flooding windows with scroll events, causing unpredictable behavior in many applications. Some scroll ok, others whip around or back and forth, or stutter uncontrollably. I probably need to find a way to "filter" out this flood of scroll events into something more manageable by Windows, but I am unaware of any existing apps or utilities to do so? Has anyone else experienced this issue and/or have any potential solutions to it?
A bit more research, and I've got at least a partial solution to the issue. It helps greatly to turn off some of the "Magic" Apple imparts to its trackpads. Namely, turning off 'scrolling with inertia' helps with scrolling when using Remote Desktop. The default functionality for magic trackpad scrolling is to apply inertia to your scroll, making pages continue to scroll after you release the pad like they have weight. While this looks and feels cool, it wreaks havoc with some older windows apps. The trick is to turn this feature off you have to open the Mac's Accessibility control panel, not the one for the trackpad itself. Within Accessibility there are additional mouse and trackpad tweaks, one of which is to turn off inertial scrolling. Also, reducing the scrolling speed to its lowest setting makes Remote Desktop scrolling a bit easier. Hope this helps others.
One of a kind workaround that I came up recently is to decrease the number of lines for one notch of the mouse wheel.
P.S. For some reason the "Wheel" tab is not visible when I'm connected via MS RDP client, but available for the beta version (Version 10.1.5 (866)).
On the Mac side, pay attention to the speed part in the trackpad settings. Here I suggest you bring it to the fastest. Also, in the remote (windows) machine, increase the line per speed from default 3 to 10 And again, on the windows side, set the mouse speed to the fastest in the additional options section.

Xcode Interface Builder Slow Performance

I recently have been working on a project that has a xib file that contains a UIView w/ a UIScrollView inside of it. There is a long list of content within the UIScrollView, and I have noticed a significant decrease in speed while working in the Interface Builder.
All other files work fine and working with the Interface Builder with other files works perfectly. It is only this specific xib file that causes a lag of about 5 seconds after making even basic changes like clicking on a UILabel. I expect that the problem is caused by the amount of objects in the main UIView's UIScrollView.
I first tried restarting everything and then tried the suggestions from this thread: Xcode 4 - slow performance
None of them solved the issue. I have never had a similar problem before. Has anyone dealt with this kind of issue before and solved it?
I have a Late 2011 Macbook Pro w/ a 2.4GHz Intel Core i5 processor and 16GB of RAM.
While the .xib is in Interface Builder, go under the File Inspector tab and disable auto-layout for the .xib, then when you're done, re-enable auto-layout for the .xib and add constraints.
Also answered here: other stackoverflow question
For what's worth. I also had major performance issues with the new Xcode. Slow slower slowest.
I did 2 thing disabled indexing en forced stopped IB.
Disable indexing:
On the command line give the command:
defaults write com.apple.dt.XCode IDEIndexDisable 1
After this, Xode runs good. Although code completion etc will not work.
If you want you can turn it on again with:
defaults delete com.apple.dt.XCode IDEIndexDisable
Force stop of Interface Builder
I found this one by surprise. During one of those awfull moments when IB was doing something / nothing or whatever, I forced stopped Xcode.
Press Alt+Cmd
Select Xcode and press force stop
After that IB runned smoothly!
It is something related to auto layout. Not sure exactly what it is.
My problem was on particular xib.
When cancelling auto layout for that xib performance is smooth. As soon as I turn it on and put constraints on my scroll view (0 margins to all sides), it goes laggy again.
What solved the lags for me was to set navigation bar appearance in interface builder to none (Was opaque).
Strange thing is, it happens only on my Mac Book air 13'. My iMac runs this exact same file smoothly. Not sure if it has something with the hardware or not.

Resources