Bug 18533 - ContentView property is always null in UITableViewHeaderFooterView class
Summary: ContentView property is always null in UITableViewHeaderFooterView class
Status: VERIFIED FEATURE
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 7.2.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-03-21 22:19 UTC by Ievgen
Modified: 2014-03-25 04:04 UTC (History)
2 users (show)

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

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:
VERIFIED FEATURE

Description Ievgen 2014-03-21 22:19:21 UTC
The property ContentView is null in UITableViewHeaderFooterView class instances, although I can see in debug that there is an instance of UITableViewCellContentView class in UITableViewHeaderFooterView's subviews. So I assume that this is a bug.

The same property in UITableViewCell has a reference to the instance of UITableViewCellContentView, so it works as expected.
Comment 1 Udham Singh 2014-03-24 06:39:54 UTC
I have checked this issue but not able to reproduce it. To reproduce this issue I have followed the steps below:

1. Create an instances of UITableViewHeaderFooterView class.
2. Checked value of “ContentView” property with the help of created instance of UITableViewHeaderFooterView class and getting it’s value as expected same as the UITableViewCell.

Screencast: http://screencast.com/t/r0SoxAAo25Y

Environment Info:
=== Xamarin Studio ===

Version 4.2.3 (build 60)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
	Mono 3.2.6 ((no/9b58377)
	GTK+ 2.24.23 theme: Raleigh
	GTK# (2.12.0.0)
	Package version: 302060000

=== Apple Developer Tools ===

Xcode 5.1 (5035)
Build 5B45j

=== Xamarin.iOS ===

Version: 7.2.0.2 (Enterprise Edition)
Hash: 58c3efa
Branch: 
Build date: 2014-10-03 18:02:26-0400

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.Android ===

Version: 4.12.1 (Enterprise Edition)
Android SDK: /Users/MM/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Build Information ===

Release ID: 402030060
Git revision: 30c4afc300c2a39ec5300851357ce02e49dd217e
Build date: 2014-03-05 22:09:33+0000
Xamarin addins: f8a9589b57c2bfab2ccd73c880e7ad81e3ecf044

=== 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

Please let me know if I am missing any thing.
Comment 2 Ievgen 2014-03-24 17:46:48 UTC
Yes, you are right. I think I made a mistake in my code. 

I was using my custom table header view class with a NIB that inherits UITableViewHeaderFooterView. In this case property ContentView is null. I guess this is because the content of NIB file rewrites default header view's content.

Sorry for false alarm. Please resolve the bug as designed.
Comment 3 Udham Singh 2014-03-25 04:04:01 UTC
As per comment 2, I am closing this issue.