UITableView/UICollectionView scrolling looks choppy after Xcode 9.0 and iOS 11 - ios11

I have four pages in the iPhone app. All 4 pages are subclass of UIViewController. Two pages have UITableView to show list of items. Two pages have UICollectionView to show data. All data fetched from web-service with help of AFNetworking. It comes very well without any issues. I show custom cells from storyboard for tableView and collectionView with all required and recommended methods.
It used to show smooth scrolling in simulator and devices before I updated my Xcode 8.3 to Xcode 9.0 and iOS 11. I tried with solutions from this and also other possible solutions from SO but does not solve my problem. Most confusing part is that I did not change single line of code for tableView or collectionView and it started showing choppy effect.
It looks like it waits for something every second and scrolling with noticeable pause even-though I do not have any complex logic while showing data. I just show data as it comes in web-service response. I have old branch as well which used to show smooth scrolling with Xcode 8.3 but when I run same code with Xcode 9.0, it show choppy scrolling.
I use macOS 10.12.6, Xcode 9, Swift 4 and simulators with iOS 11 and iOS 10.3.

We found a workaround for this issue! If you simply implement
-[UITableView tableView:estimatedHeightForRowAtIndexPath:]
and return your
-[UITableView tableView:heightForRowAtIndexPath:]
everything will work.
Update:
It turns out the core of the issue is that when you allocate a new UITableView with Xcode 8, the default value for UITableView.estimatedRowHeight is 0, whereas when you do the same with Xcode 9, the default value is -1, or UITableViewAutomaticDimension. Setting it back to 0 fixes the issue.

Set isPrefetchingEnabled of your collection view to false, OR(which solves your problem way better) use pre-fetching methods in UICollectionViewDataSourcePrefetching/UITableViewDataSourcePrefetching to get smoother and more efficient scrolling. Make any web loading there for data to be ready for when a cell needs to be created

Related

Inability to correctly scale canvas on iOS for an AirConsole controller created in Construct 2

I have been playing around with creating AirConsole controllers using Construct 2. Construct 2 comes with several scaling modes to ensure that the canvas scales as desired. I have tested every possible combination, and found that the simulator (running in Safari, Edge, Chrome, and Firefox) works correctly, the Nexus 5 works correctly, but the iPhone 7 Plus and iPad (running the iPhone AirConsole app) both do not obey the scaling I have set in Construct 2.
At 1280x720, this means a portion of the controller is always offscreen. I have used both the "AirConsole" and "AirConsoleController" plugins on the screen side, and both have the same issue. When I remove both plugins from my Construct 2 project and load the page using airconsole.com/#[SERVER_URL]/pong, the scaling problem goes away, but I lose the ability to call AirConsole API methods (set orientation to landscape, handshake, messaging, etc.).
I fully understand that this probably not high on the priority list, as the AirConsole team has done a great job putting together the controller generator, but would it be possible to take a look into this problem on iOS devices? Is there something happening on the AirConsole side that would overwrite the Construct 2 screen scaling rules for iOS controllers?
One of our team's goals is to create a controller minigame that a user would play on their device while the main game was in progress on screen.html. It would much simpler to do this in Construct 2, rather than coding it by hand.
Edit:
I reran a quick test of the Pong example using the Phaser.io tank screen as a controller, instead of the pong buttons. In this test, I would expect to see the tank screen loading onto the controller. This is what I see on the simulator and on my Nexus 5. On my iPhone, half of the tank screen is off of the edge of the phone.
Since a similar behavior occurs in both the Construct 2 and Phaser.io projects, I have a hunch that the problem might occur whenever a canvas element is placed on iOS screens for AirConsole controllers.
There seems to be a bug on iOS with iframes.
Applying this CSS to the controller.html fixed it for some developers:
html, body {
height: 100%;
overflow: hidden;
}

Simulator options won't show in Xcode 6.4

I don't get the option to run my app on a certain simulator or anything. I'm trying to upload my app to iTunes Connect but it won't even let me.
Try increasing your screen resolution, or making the Xcode window wider. Then it will reappear.
If you can't do either of those (do to screen resolution constraints), then use the Product menu and then the Destination sub-menu as a workaround.
And by the way, this looks like a duplicate Question #31318316

How to make an app that would work fine for both iphone 5 and 4s

I am making an iphone app using the latest Xcode i.e Xcode 4.5.1.
The current XIB files are suited for iphone 5. I am not sure how to make the app that would work on both the screen sizes i.e 3.5 and 4 inch??
Is it that I have too use two different sets of *XIB*s??
Check out this answer, it's the approach I took.
Basically, create two different xibs or storyboards and choose which one to use at application launch.
2 different xib is a kind of solution but you need to play with AutoResizing property of View if you don't want to create different xib's. Also you need to use Default#2x.png for iPhone4 and Default-568#2x.png for iPhone5, these are the SplashScreen images to identify whther app is running on iPhone4 or iPhone4.
If you have created iPhone4 compatible application then just add Default-568#2x.png image. Your application will work for iPhone5. But you need to handle UI for this. For example if you are using UITableView so just use Flexible height instead of hardcore frame.

How to force landscape on a Flash builder mobile app

I am building a mobile application using Flash Builder. I am testing on a Motorola Xoom. When the app opens on the attached Xoom it opens with the correct orientation (landscape), but when it opens on the computer in the emulator it is backwards (Portrait).
I have specified the ratio and orientation in the *-app.xml:
<aspectRatio>landscape</aspectRatio>
<autoOrients>false</autoOrients>
I'm assuming it is a bug but it is possible that I am missing something or that there may be a fix.
In my case, neither was working. So, for the desktop version, I've made an ugly thing: duplicated the aspectRatio property above the others, after title property. I don't know if the position of the property matters, but that way it worked.
There is just one problem with this approach: when building the debug version of your application all works fine (including in mobile), but when you build the release version, an error occurs saying that the aspectRation property is unexpected. Just remove one of them and the build will work.
Just for the register, to make it work in mobile, I had to set the property aspectRatio in the code too, like this:
stage.setAspectRatio(StageAspectRatio.LANDSCAPE);

WPF: Menu items and combo boxes don't render in Windows 7 64-bit

I'm trying to use an existing internal WPF application (I do have access to the source), but it was developed on XP and I'm using Windows7 64-bit.
When I click (for instance) the File menu, 90% of the time I see no drop-down menu at all. The menu still exists - I can use the arrow keys to navigate up and down and choose an option if I happen to know the order of the options, but nothing renders at all.
The other 10% of the time, the menu or some portion of it DOES render, but as I move the cursor up and down I get graphical corruption or disappearing options until I end up back at the "no menu is visible at all" state.
This is also true of combo boxes within the application - they show no data when I drop them down, but I can arrow down and choose an entry.
Microsoft has some advice about WPF rendering issues here but none of these steps has helped with my issue.
Edit: a coworker running Windows 7 sees the menus just fine... he has a different video card, so I'm curious whether this is video-card specific.
This also sounds similar to an issue we had seen in XP, where comboboxes (or menus) would not display properly some of the time. There is a Microsoft hotfix (for at least one flavor of it) here, but unfortunately it is for XP and WS2003. I'm not sure if this could point you in the right direction.
The link to this hotfix was found in this MSDN thread. I am not the author of this particular link, although I do remember raising this issue some time (and a different job) ago.
It turns out that in this specific case, the issue is only present on boxes that have a GeForce 6800 video card. Updating drivers has no effect, but switching to a 7800 makes the issue go away.
I have no idea why this is the case, and I haven't found any information online about 6800-specific graphical issues in Win7 64, but our testing and experimentation shows this is the factor that causes it.
Crazy.
See this question. It's probably a problem with a DropShadowEffect, removing the Effect should fix the problem.
I second that the issue is related to NVidia Windows 7 x64 drivers. Recently I had to replace my video card. Now I have Quadro FX 3400 with the latest drivers and am seeing similar behavior. WPF ComboBoxes don't render dropdown portions. I can only switch values with keyboard after a few attempts. It could be Direct2D-related issue. I also had to turn that off for Firefox to start working again.

Resources