Bug 24259 - Adding items to TableView does not render on iOS7
Summary: Adding items to TableView does not render on iOS7
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.3
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Seth Rosetter
URL:
Depends on:
Blocks:
 
Reported: 2014-11-04 16:47 UTC by Michael
Modified: 2015-05-29 17:01 UTC (History)
4 users (show)

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


Attachments
Sample Project with Bug (74 bytes, text/plain)
2014-11-04 16:57 UTC, Michael
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 FIXED

Description Michael 2014-11-04 16:47:07 UTC
Description:
Using MessagingCenter to add a new ViewCell to TablieViews current TableSection. This renders as expected in iOS8, but not in iOS7. I originally discovered this bug not using MessagingCenter and thought using the MessagingCenter would be a workaround. 

Overview:
In iOS7, the TableView initially renders, but items added to the TableView will not render. 
In iOS8, the TableView initially renders and items added to the TableView render.

Steps to Reproduce:
Create content page with TableView and button. Content Page is created in a NavigationPage in App.cs
Wire button to push a new content Page with a ListView of objects.
On ItemSelect of the ListView, pass the selected item into a new ViewCell that is added to the TableSection of the TableView.
This happens when using both a MessagingCenter and when you pass the TableSection into the new ContentPage then add it prior to popping the view. Bug is only displayed in iOS7 and 7.1, but TableView functions as expected in iOS8.

Actual Results (iOS7):
App pops the Page containing the ListView and returns to the initial TableView, but the SelectedItem is not added to the TableView.
Actual Results (iOS8):
App pops the Page containing the ListView once an item is selected. The selected item is added to the TableView as expected.

Expected Results (both iOS7 and iOS8):
Once an item is selected from the ListView, the view pops and the TableView is populated with the new ViewCell.

I have attached the sample project of the bug. I was able to recreate the bug on simulator and on device.

Using Xamarin Forms 1.2.3.6257
Using Xamarin Studio 5.6.2 (build 5)
Mac OSX 10.9.5
Comment 1 Michael 2014-11-04 16:57:02 UTC
Created attachment 8623 [details]
Sample Project with Bug
Comment 2 Rajneesh Kumar 2014-11-05 03:19:10 UTC
I have checked this issue and observed the following behavior.

Please confirmed me  that is this the same issue/behavior experiencing you as shown in the screencast.

On iOS 8: I observed that , The TableView initially renders. App pops the Page containing the ListView and returns to the initial TableView, I am able to add items to the TableView. TableView initially renders and items added to the TableView render.

On iOS 7: I observed that, The TableView initially renders. App pops the Page containing the ListView and returns to the initial TableView, but I an not able to add items to the TableView.

Steps I Followed:

1. Open attached attached sample in XS.
2. Build and deploy the application on iOS 8 simulator.
3. Click on "Add Hop" in bottom,
4. New page appear, click on "Xamarin_Forms_TableView.TestObj"
5. Test page will appear enter some text in textbooks click  "Add Hop"
6. Click again on "Xamarin_Forms_TableView.TestObj"
7. Observe that items is added to the view as expected.

Screencast (iOS 8): http://www.screencast.com/t/w7pqmX60

Screencast (iOS 7): http://www.screencast.com/t/RkJizopoO3o

App O/P (iOS 7): https://gist.github.com/Rajneesh360Logica/c847b6a74930aa8e0b02

Additional Information: Getting same behavior on device in both case (iOS 8, iOS 7.1).

Environment Info:

=== Xamarin Studio ===

Version 5.5.3 (build 6)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
	Mono 3.10.0 ((detached/e204655)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000023

=== Xamarin.Android ===

Version: 4.18.1 (Business 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)
		4.4.87 (API level 20)
		4.5    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Apple Developer Tools ===

Xcode 5.1 (5084)
Build 5B130a

=== Xamarin.iOS ===

Version: 8.4.0.16 (Business Edition)
Hash: 80e9ff7
Branch: 
Build date: 2014-10-22 15:09:12-0400

=== Xamarin.Mac ===

Version: 1.10.0.18 (Business Edition)

=== Build Information ===

Release ID: 505030006
Git revision: fbe3e9453daf6a3bb9a9709ed22bec35f7c9056b
Build date: 2014-10-23 13:08:38-04
Xamarin addins: e44add2b39de4dd57c0742bb2e620dfad84c64c6

=== Operating System ===

Mac OS X 10.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 3 Michael 2014-11-05 11:27:26 UTC
This is the same issue/behavior i have been experiencing as shown in the screencast.
Comment 4 Rajneesh Kumar 2014-11-05 23:08:49 UTC
@Michael 
               Thanks for the confirmation. 
I am changing the status of this issue needinfo to confirmed as per comment 3.
Comment 5 Michael 2014-11-06 16:27:27 UTC
I was also able to confirm this is happening with Android as well. You can use the same project solution to confirm the Android behavior.
Comment 6 Rajneesh Kumar 2014-11-07 03:46:50 UTC
I try to reproduce this issue with Android but on deploying the application I am getting the following exception:  "System.TypeLoadException"

Exception: https://gist.github.com/Rajneesh360Logica/7251c0a80dd872edd0ec

Application Output: https://gist.github.com/Rajneesh360Logica/c658c41447a5f9ae96ef

Screencast: http://www.screencast.com/t/BLi3mLYq
Comment 7 Michael 2014-11-07 13:54:30 UTC
I just looked into it, You need to update Xamarin.Forms package in the Android Project. I was able to compile and run the solution on Android afterwards. I am experiencing the same behavior experiences on iOS7.
Comment 8 Rajneesh Kumar 2014-11-10 00:48:27 UTC
@ Michael , Thanks a lot again.

I have checked issue after updating Xamarin.Forms package in the Android Project, now I am able to reproduce the same behavior on android as on iOS 7.
Comment 9 Rajneesh Kumar 2014-11-10 00:50:36 UTC
An update to comment 8

Here is the screencast for behavior on android.

Screencast: http://www.screencast.com/t/cPCBvU20

Thanks.
Comment 10 Michael 2014-11-10 14:14:24 UTC
Yup, that is exactly what I have experienced.
Comment 11 Seth Rosetter 2015-05-29 17:01:20 UTC
Hey all,

I have confirmed this issue using the project provided (referencing 1.2.3). After updating to latest stable (1.4.2), the issue appears to be resolved. 

Thanks!
- Seth