public override void Draw (RectangleF bounds, CGContext context, UIView view) { //UIColor.White.SetFill (); //context.FillRect (bounds); try { UIView searchView = view.ViewWithTag(1); if (searchView == null) { var photoCellView = new PhotoCellView(_images, cellIndex, null); photoCellView.Tag = 1; view.Add(photoCellView); } else { var photoCellView = (PhotoCellView)searchView; photoCellView.Update(_images, cellIndex); photoCellView.DrawBorder(UIColor.Green); } } catch (Exception ex) { Util.LogException("Draw ImagesElement", ex); } }
// Create the UIViews that we will use here, layout happens in LayoutSubviews public PhotoCell (UITableViewCellStyle style, NSString ident, List<ImageInfo> filenames, int rowIndex, Action<BuzzPhoto> onPhotoClicked) : base(style, ident) { SelectionStyle = UITableViewCellSelectionStyle.None; photoRowView = new PhotoCellView (filenames, rowIndex, onPhotoClicked); ContentView.Add (photoRowView); }