Bug 21263 - Cell background colour in Storyboard doesn't show on iPad Mini
Summary: Cell background colour in Storyboard doesn't show on iPad Mini
Status: RESOLVED FEATURE
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS Designer ()
Version: 5.1
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: master
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-07-11 11:14 UTC by Christian Rishøj
Modified: 2014-11-11 10:11 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Sample project (9.84 KB, application/zip)
2014-07-11 11:14 UTC, Christian Rishøj
Details
expected – on simulator (188.50 KB, image/png)
2014-07-11 11:21 UTC, Christian Rishøj
Details
failed - on iPad Mini (111.88 KB, image/png)
2014-07-11 11:21 UTC, Christian Rishøj
Details
expected - on iPad Mini but BaseCell.cs removed (112.79 KB, image/png)
2014-07-11 11:21 UTC, Christian Rishøj
Details
sample project for iOS 8 (9.65 KB, application/zip)
2014-07-16 09:56 UTC, Christian Rishøj
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FEATURE

Description Christian Rishøj 2014-07-11 11:14:50 UTC
Created attachment 7337 [details]
Sample project

Description of Problem:

I present to you an issue that has caused myself quite some head-scratching.

For certain cells, I specify a custom background colour in the Storyboard. This has always worked well, until it suddenly stopped working on iPad Minis(!).

The cell background colour appears as expected in the simulator, and on iPhones, but not on an iPad Mini.

I have reduced the problem to a minimal project (attached). 

What's weird is: If the file "BaseCell.cs" is removed from the project, then the issue goes away, despite the fact that the class in this file is not being referenced at all in the project!

Steps to reproduce the problem:
1. Run the attached project in the simulator (or on an iPhone)
2. Observe that the table view cells have coloured backgrounds
3. Run the attached project on an iPad Mini
4. Observe that the background colours are gone
5. Now, remove the file "BaseCell.cs" from the project, and once again run on the iPad Mini
6. Observe that the missing background colours are now back

How often does this happen? 
Consistently.

Additional Information:

=== Xamarin Studio ===

Version 5.1.2 (build 0)
Installation UUID: a2c3ebba-03b0-42fb-a504-a5d1b522dea9
Runtime:
	Mono 3.4.0 ((no/954ed3c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 304000214

=== Apple Developer Tools ===

Xcode 5.1.1 (5085)
Build 5B1008

=== Xamarin.Mac ===

Version:

=== Xamarin.Android ===

Not Installed

=== Xamarin.iOS ===

Version: 7.2.5.5 (Business Edition)
Hash: 87026b6
Branch: 
Build date: 2014-07-02 19:39:08-0400

=== Build Information ===

Release ID: 501020000
Git revision: 4574b1e5cf09f2e95e486c259bd9267a68c77cb3
Build date: 2014-07-02 20:50:40-04
Xamarin addins: fdea6fe3e36cda39291b39c81133e409c6d6f092

=== Operating System ===

Mac OS X 10.9.4
Darwin Christians-MacBook.local 13.3.0 Darwin Kernel Version 13.3.0
    Tue Jun  3 21:27:35 PDT 2014
    root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
Comment 1 Christian Rishøj 2014-07-11 11:21:01 UTC
Created attachment 7338 [details]
expected – on simulator
Comment 2 Christian Rishøj 2014-07-11 11:21:19 UTC
Created attachment 7339 [details]
failed - on iPad Mini
Comment 3 Christian Rishøj 2014-07-11 11:21:41 UTC
Created attachment 7340 [details]
expected - on iPad Mini but BaseCell.cs removed
Comment 4 Christian Rishøj 2014-07-12 05:35:40 UTC
Note that the Storyboard was created using Xcode Interface Builder, rather than the Xamarin designer. Thus, possibly, the bug is assigned to the wrong component.
Comment 5 Udham Singh 2014-07-14 08:10:16 UTC
I have checked this issue and getting the same behavior mentioned in bug description. To reproduce this issue I have followed the steps mentioned in bug description.

Environment Info : 

=== Xamarin Studio ===

Version 5.1.2 (build 0)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
	Mono 3.4.0 ((no/954ed3c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 304000214

=== Apple Developer Tools ===

Xcode 5.1 (5084)
Build 5B130a

=== Xamarin.iOS ===

Version: 7.2.5.5 (Enterprise Edition)
Hash: 87026b6
Branch: 
Build date: 2014-07-02 19:39:08-0400

=== Xamarin.Mac ===

Version:

=== Build Information ===

Release ID: 501020000
Git revision: 4574b1e5cf09f2e95e486c259bd9267a68c77cb3
Build date: 2014-07-02 20:50:40-04
Xamarin addins: fdea6fe3e36cda39291b39c81133e409c6d6f092

=== Operating System ===

Mac OS X 10.9.2
Darwin MacMini.local 13.1.0 Darwin Kernel Version 13.1.0
    Thu Jan 16 19:40:37 PST 2014
    root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64
Comment 6 Christian Rishøj 2014-07-14 08:33:44 UTC
Thanks for the input.

As far as I can tell, the bug is triggered by merely subclassing UITableViewCell – even though the derived class is never instantiated or even referenced in the Storyboard or code.
Comment 7 Christian Rishøj 2014-07-16 09:23:27 UTC
FYI, the issue persists with Xamarin.iOS 7.9.1.90 / iOS 8.0 (beta).
Additionally, with this configuration, the iPad simulators exhibit the issue as well as the actual iPad Mini.
Comment 8 Christian Rishøj 2014-07-16 09:55:33 UTC
With Xamarin.iOS 7.9.1.90 / iOS 8.0 (beta), the issue is reproducible without subclassing UITableViewCell.
In particular:
 • Target Devices = iPhone/iPod, run on iPhone simulator: OK
 • Target Devices = iPhone/iPod, run on iPad simulator: OK
 • Target Devices = Universal, run on iPhone simulator: OK
 • Target Devices = Universal, run on iPad simulator: FAILED (background color is gone)
 • Target Devices = iPad, run on iPad simulator: FAILED (background color is gone)

Attaching a reduced test project exhibiting the issue for iOS 8.
Comment 9 Christian Rishøj 2014-07-16 09:56:37 UTC
Created attachment 7388 [details]
sample project for iOS 8
Comment 10 Christian Rishøj 2014-07-18 07:36:18 UTC
The problem probably lies upstream:
http://stackoverflow.com/questions/18991051/unable-to-change-background-color-of-static-tableview-cell-on-ios-7-ipad?rq=1

What initially led me to believe that the Xamarin stack was causing the issue was the observation that the issue was triggered by including a `.cs` file with a `UITableView` subclass in the project.
Comment 11 Christian Rishøj 2014-07-18 07:36:50 UTC
* `UITableViewCell` subclass
Comment 12 Alan McGovern 2014-11-11 10:11:46 UTC
Sorry for the delay in responding here. It looks like this is just how iOS is supposed to work, so I'm just going to resolve this as 'feature'. Thanks for the in-depth investigation!