Author Topic: Drag Stuttering on iOS7  (Read 2880 times)

DaveMiller

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Drag Stuttering on iOS7
« on: February 17, 2014, 07:16:22 AM »
Hi,

I'm experiencing stuttering of draggable NGUI objects on iOS7.
The stuttering appears to occur when the Control Center/Notification Center tab is shown by swiping up from the bottom of the screen.
Actually opening the Control Center/Notification Center will clear the stuttering.

I've attached an example project. Repro instructions are included in the project in UILabels.

It was built using NGUI 3.0.9 f4 (Not included).
I have been building to iOS7 with Unity Pro 4.3.4f1 & Xcode 5.0.2

Is this an NGUI bug?
Any help much appreciated.

Tripwire

  • Full Member
  • ***
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 163
    • View Profile
Re: Drag Stuttering on iOS7
« Reply #1 on: February 17, 2014, 11:06:33 AM »
Hi,

I'm experiencing stuttering of draggable NGUI objects on iOS7.
The stuttering appears to occur when the Control Center/Notification Center tab is shown by swiping up from the bottom of the screen.
Actually opening the Control Center/Notification Center will clear the stuttering.

I've attached an example project. Repro instructions are included in the project in UILabels.

It was built using NGUI 3.0.9 f4 (Not included).
I have been building to iOS7 with Unity Pro 4.3.4f1 & Xcode 5.0.2

Is this an NGUI bug?
Any help much appreciated.

Hi :)

Have you tried setting the framerate to 60?
  1. Application.targetFrameRate = 60;
  2.  

DaveMiller

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: Drag Stuttering on iOS7
« Reply #2 on: February 17, 2014, 11:15:36 AM »
Hi Tripwire- thanks for the response :)

Yes, I have a script in the scene that sets the framerate to 60.

The framerate is not affected during the stuttering (There's a rotating UITexture square in the example scene that remains smooth).

It looks like the input is affected when native iOS views are created!?!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Drag Stuttering on iOS7
« Reply #3 on: February 17, 2014, 11:56:07 AM »
Sounds like a question for Unity. It is quite logical for the framerate to go down when OS stuff is shown. More stuff shown = more draw calls and more fillrate.

DaveMiller

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: Drag Stuttering on iOS7
« Reply #4 on: February 17, 2014, 02:33:28 PM »
In this case, the framerate is not affected.

I have a spinning square in the example project attached to my original post which remains smooth.
The stuttering only affects the widget that is being dragged.

Another point is that the stuttering persists even AFTER the Control Center/Notification Center TAB is hidden.
This fact and the simplicity of the scene (2 small UITextures, 2 UILabels), running on an iPhone5S leads me to believe it is not a fillrate/drawcall issue.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Drag Stuttering on iOS7
« Reply #5 on: February 18, 2014, 07:51:37 AM »
So you're saying framerate remains fine, but user interaction is what gets affected? Then it sounds like Input stuff gets affected. Input.GetTouch and such. Perhaps something causes input events to arrive at a different rate after the tab gets shown? You can test it yourself by adding some NGUIDebug.Log statements into UICamera where it gets the touch events (or just into a separate script that does Input.GetTouch). Print the delay since the last change -- that should give you a good idea.

DaveMiller

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: Drag Stuttering on iOS7
« Reply #6 on: February 18, 2014, 09:15:02 AM »
Hi Aren, thanks for the reply.

I tried your suggestion, and yes, after the tab is shown, the delay between touches being updated is increased.
So it seems this is not an issue with NGUI.

Interestingly, the same thing happens in iOS6, although the stuttering only persists momentarily.
Looks like an iOS7 bug.

Thanks for the help!