# Slow/jittery performance with ListBox scroll on iOS

**URL:** <https://forum.juce.com/t/slow-jittery-performance-with-listbox-scroll-on-ios/15350>\
**Category:** MacOSX and iOS\
**Created:** [August 17, 2015, 3:16pm UTC](https://forum.juce.com/t/slow-jittery-performance-with-listbox-scroll-on-ios/15350 "2015-08-17T15:16:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamwilson](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/adamwilson/32/1387_2.png) [@adamwilson](https://forum.juce.com/u/adamwilson)\
**Post date:** [August 17, 2015, 3:16pm UTC](https://forum.juce.com/t/slow-jittery-performance-with-listbox-scroll-on-ios/15350/1 "2015-08-17T15:16:01Z")

</div>

I'm getting really slow & jittery performance on an iPhone 3 running iOS 7.1 with a scrolling ListBox.&nbsp;

Its using a custom row component. I've tried using setOpaque(true) on the row component and its children, but that does not seem to have made any difference in performance. I'm also using OpenGL.&nbsp;

Anything I should look at to get smooth scrolling performance on iOS?&nbsp;

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![dave96](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dave96/32/8487_2.png) [@dave96](https://forum.juce.com/u/dave96)\
**Post date:** [August 17, 2015, 4:04pm UTC](https://forum.juce.com/t/slow-jittery-performance-with-listbox-scroll-on-ios/15350/2 "2015-08-17T16:04:28Z")

</div>

You have to use a profiler for stuff like this. iOS is a very different beast to OS X/Win so the bottlenecks could be in different places.

I found it was best to use a native list box on iOS. It gave far the best peformance and feel.

---

<div class="post-metadata">

**Author:** ![adamwilson](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/adamwilson/32/1387_2.png) [@adamwilson](https://forum.juce.com/u/adamwilson)\
**Post date:** [August 18, 2015, 10:20pm UTC](https://forum.juce.com/t/slow-jittery-performance-with-listbox-scroll-on-ios/15350/3 "2015-08-18T22:20:50Z")

</div>

Thanks. Having some issues with the Xcode instruments rebooting the device whenever I try and run the profiler. I tested with a basic listbox in a new project and the performance is fine, so its probably&nbsp;something to do with my code. I'm also struggling with incredibly long build times for release builds - up to about 10 mins at a time spent on the linking stage.&nbsp;

I'll have a look at using a native listview / UITableListView. In some ways I'd like to use native UI for navigation and list elements as they make smooth transitions and scrolling so much better. For&nbsp;iOS this is not so bad sd we have the UIViewComponent class&nbsp;but for Android this is a whole other kettle of fish and requires a fair bit of restructuring.&nbsp;

Anyhow, I'll report back with my findings when I manage to get the profiler working.&nbsp;

---

<div class="post-metadata">

**Author:** ![keithw99](https://avatars.discourse-cdn.com/v4/letter/k/b782af/32.png) [@keithw99](https://forum.juce.com/u/keithw99)\
**Post date:** [September 27, 2020, 9:28pm UTC](https://forum.juce.com/t/slow-jittery-performance-with-listbox-scroll-on-ios/15350/4 "2020-09-27T21:28:10Z")

</div>

Hi – JUCE noob here coming across the same issue 5 years later. I recently put together my first JUCE GUI prototype that makes heavy use of a large (Table)ListBox, and the scrolling is extremely slow/jittery on iOS exactly as you described. My Mac OS and Linux builds don’t have this problem at all.

I’m guessing that you’re the same person who gave this great presentation:

[![](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/8/88015fea25c51ab13d3e9d87ecc72662ec961ef2.jpeg "Mobile development with JUCE and native APIs, Adam Wilson, JUCE Summit 2015") ](https://www.youtube.com/watch?v=R2WhYU2JTfQ)

If so, it sounds like you solved this problem by using iOS-native UI elements and ditching the ListBox altogether…

I was hoping to avoid that route, especially since my iOS build works great otherwise – the _only_ issue is the scrollability of lists. Unfortunately that one issue is crippling for UX since a primary feature of the app is the ability to quickly scroll through long lists of patch names.

So as a last-ditch effort before I dive into the world of iOS development (where I have zero experience), I was hoping to find out two things:

1. Is there anything I can do in JUCE (tricks, using different classes, etc) that would improve the scrolling performance of a TableListBox in iOS? Have there been any improvements/workarounds since this original post?
2. If my only UI concern is list-scrolling performance, what is the least-invasive way to fix that with iOS-native code? i.e. could I somehow replace my TableListBox with a native UITableListView but keep the rest of my UI in JUCE?

Thanks,  
Keith

---

<div class="post-metadata">

**Author:** ![dikadk13](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dikadk13/32/17750_2.png) [@dikadk13](https://forum.juce.com/u/dikadk13)\
**Post date:** [September 30, 2020, 1:40pm UTC](https://forum.juce.com/t/slow-jittery-performance-with-listbox-scroll-on-ios/15350/5 "2020-09-30T13:40:23Z")

</div>

I replaced Juce Viewport with native iOS UIScrollView

Here is gist of my Viewport. You can modify ListBox or TableListBox to use this Viewport and it will work great on iOS.

> <https://gist.github.com/dikadk/3e68cd7c7c024a38de54da524613a5e8>

Most important part is in ios\_viewport.mm.  
Once added to project make sure to specify that ios\_viewport.mm is Objective-C++ in Xcode and you added flag “-fno-objc-arc” to compiler schema.

---

<div class="post-metadata">

**Author:** ![adamwilson](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/adamwilson/32/1387_2.png) [@adamwilson](https://forum.juce.com/u/adamwilson)\
**Post date:** [September 30, 2020, 1:59pm UTC](https://forum.juce.com/t/slow-jittery-performance-with-listbox-scroll-on-ios/15350/6 "2020-09-30T13:59:06Z")

</div>

This a great solution that will work for the use case where you just need scrollable lists.

If you need ViewController screen “push” type behaviour as well, and other “swipeable” UI elements, I would consider switching things around so that you build a native app and pull in JUCE as a library.

---

<div class="post-metadata">

**Author:** ![keithw99](https://avatars.discourse-cdn.com/v4/letter/k/b782af/32.png) [@keithw99](https://forum.juce.com/u/keithw99)\
**Post date:** [October 1, 2020, 1:47am UTC](https://forum.juce.com/t/slow-jittery-performance-with-listbox-scroll-on-ios/15350/7 "2020-10-01T01:47:28Z")

</div>

Thank you both so much! For my case the ios\_viewport seems perfect since list scrolling is the only performance issue I’m having, and that class seems to be exactly what I need.

I’ve made a decent effort to keep the logic of my model/view/controller separate so if I decide to convert the UI to native iOS it hopefully won’t be too painful.

---

<div class="post-metadata">

**Author:** ![Mathiasdamgard](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@Mathiasdamgard](https://forum.juce.com/u/Mathiasdamgard)\
**Post date:** [April 4, 2022, 12:40pm UTC](https://forum.juce.com/t/slow-jittery-performance-with-listbox-scroll-on-ios/15350/8 "2022-04-04T12:40:14Z")

</div>

Hi guys, sorry for reviving an old thread.

Has anyone managed to do the same solution or something like it on android?  
We’d very much like to keep it cross platform but the list performance isn’t quite up to snuff.  
So far I’ve been able to pull juce objects into a native view with a scrollView but can the opposite be done? As in have a juce component with a native scrollView.
