public void LoadProductData() { // Add spinner while loading data. TableView.Source = new ProductDetailPageSource(new [] { new SpinnerCell(), }); colorOptions = CurrentProduct.Colors; sizeOptions = CurrentProduct.Sizes; imageUrls = CurrentProduct.ImageUrls.ToArray().Shuffle(); imageView = new JBKenBurnsView { Frame = new RectangleF(0, -60, 320, 400), Images = Enumerable.Range(0, imageUrls.Length).Select(x => new UIImage()).ToList(), UserInteractionEnabled = false, }; loadImages(); var productDescriptionView = new ProductDescriptionView(CurrentProduct) { Frame = new RectangleF(0, 0, 320, 120), }; TableView.TableHeaderView = new UIView(new RectangleF(0, 0, imageView.Frame.Width, imageView.Frame.Bottom)) { imageView }; var tableItems = new List <UITableViewCell> () { new CustomViewCell(productDescriptionView), }; tableItems.AddRange(GetOptionsCells()); TableView.Source = new ProductDetailPageSource(tableItems.ToArray()); TableView.ReloadData(); }
public void LoadProductData () { // Add spinner while loading data. TableView.Source = new ProductDetailPageSource (new [] { new SpinnerCell(), }); colorOptions = CurrentProduct.Colors; sizeOptions = CurrentProduct.Sizes; imageUrls = CurrentProduct.ImageUrls.ToArray().Shuffle(); imageView = new JBKenBurnsView { Frame = new RectangleF (0, -60, 320, 400), Images = Enumerable.Range(0,imageUrls.Length).Select(x=> new UIImage()).ToList(), UserInteractionEnabled = false, }; loadImages (); var productDescriptionView = new ProductDescriptionView (CurrentProduct) { Frame = new RectangleF (0, 0, 320, 120), }; TableView.TableHeaderView = new UIView(new CGRect(0,0,imageView.Frame.Width,imageView.Frame.Bottom)){imageView}; var tableItems = new List<UITableViewCell> () { new CustomViewCell (productDescriptionView), }; tableItems.AddRange (GetOptionsCells ()); TableView.Source = new ProductDetailPageSource (tableItems.ToArray ()); TableView.ReloadData (); }