public MyTableViewDelegate (TableViewCell tableViewCell) { this.tableViewCell=tableViewCell; }
// Customize the appearance of table view cells. public override UITableViewCell GetCell (UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { string cellIdentifier = "Cell"; //HorizontalTableCell cell = (HorizontalTableCell)tableView.DequeueReusableCell (cellIdentifier); TableViewCell cell = (TableViewCell)tableView.DequeueReusableCell (cellIdentifier); if (cell == null) { //cell = new TableViewCell (UITableViewCellStyle.Default, cellIdentifier); //tableViewCell = new TableViewCell (); tableViewCell = new TableViewCell (UITableViewCellStyle.Default, cellIdentifier); tableViewCell.Frame=new RectangleF(0, 0, 320 , 0);// Este era el problema ! //tableViewCell.UserInteractionEnabled = true; //tableViewCell.ContentMode =UIViewContentMode.ScaleToFill; //tableViewCell.ContentStretch = new RectangleF(0, 0, 1, 1); //tableViewCell.horizontalTableView=[[UITableView alloc] initWithFrame:CGRectMake(0, 0, 320, 320)]; //tableViewCell.horizontalTableView=new UITableView(new RectangleF(0, 0, 320, 320)); //tableViewCell.horizontalTableView.dataSource=tableViewCell; tableViewCell.horizontalTableView=new UITableView(); tableViewCell.horizontalTableView.Source = new TableViewCell.MyTableViewDelegate (tableViewCell); //tableViewCell.horizontalTableView.delegate=tableViewCell; tableViewCell.AddSubview(tableViewCell.horizontalTableView); //tableViewCell.horizontalTableView.frame=CGRectMake(0, 0, 100 , 320); tableViewCell.horizontalTableView.Frame=new RectangleF(0, 0, 0 , 320); // tableViewCell.horizontalTableView.AllowsSelection = true; // tableViewCell.horizontalTableView.AlwaysBounceVertical = true; // tableViewCell.horizontalTableView.AlwaysBounceHorizontal = false; // tableViewCell.horizontalTableView.ContentMode =UIViewContentMode.ScaleToFill; // tableViewCell.horizontalTableView.ContentStretch = new RectangleF(0, 0, 1, 1); // tableViewCell.horizontalTableView.DelaysContentTouches = false; // tableViewCell.horizontalTableView.ScrollEnabled = true; //tableViewCell.horizontalTableView. //tableViewCell.horizontalTableView.DirectionalLockEnabled = false; tableViewCell.horizontalTableView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; //tableViewCell.horizontalTableView.AutoresizingMask //tableViewCell.horizontalTableView.userInteractionEnabled = YES; //tableViewCell.horizontalTableView.SeparatorStyle=UITableViewCellSeparatorStyle.None; //tableViewCell.horizontalTableView.AlwaysBounceHorizontal=false; //tableViewCell.horizontalTableView.AlwaysBounceVertical = true; //tableViewCell.horizontalTableView.AlwaysBounceHorizontal = false; //tableViewCell.horizontalTableView.ScrollEnabled = true; //tableViewCell.horizontalTableView.ShowsHorizontalScrollIndicator=true; //tableViewCell.horizontalTableView.DirectionalLockEnabled = true; //tableViewCell.horizontalTableView.DelaysContentTouches=true; tableViewCell.horizontalTableView.CanCancelContentTouches=false; //tableViewCell.horizontalTableView. CGAffineTransform rotateTable = CGAffineTransform.MakeRotation(-3.141f * 0.5f); tableViewCell.horizontalTableView.Transform = rotateTable; tableViewCell.horizontalTableView.Frame = new RectangleF ( 0, 0, tableViewCell.horizontalTableView.Frame.Size.Width, tableViewCell.horizontalTableView.Frame.Size.Height ); //tableViewCell.contentArray = [arrays objectAtIndex:indexPath.section]; tableViewCell.contentArray = controller.arrays [indexPath.Section]; //cell = [tableViewCell retain]; cell = tableViewCell ; //self.tableViewCell = nil; } // cell.Frame=new RectangleF(0,0,768,220); // // // CGAffineTransform rotateTable = CGAffineTransform.MakeRotation(-3.141f * 0.5f); // cell.horizontalTableView.Transform = rotateTable; // cell.horizontalTableView.Frame = new RectangleF(0, 0, // cell.Frame.Size.Width, // cell.Frame.Size.Height); // cell.horizontalTableView.AllowsSelection=true; // cell.horizontalTableView.AllowsMultipleSelection=false; // cell.horizontalTableView.ScrollEnabled=true; //cell.horizontalTableView.DelaysContentTouches=false; // cell.horizontalTableView.CanCancelContentTouches=true; //cell.horizontalTableView.Transform.Rotate(-3.141f * 0.5f); //cell.Transform.Rotate //cell.Transform.Rotate(-3.141f * 0.5f); // Configure the cell. //cell.TextLabel.Text = NSBundle.MainBundle.LocalizedString ("Detail", "Detail"); //cell.contentArray = controller.arrays[indexPath.Section]; return cell; }
// Customize the appearance of table view cells. public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { string cellIdentifier = "Cell"; //HorizontalTableCell cell = (HorizontalTableCell)tableView.DequeueReusableCell (cellIdentifier); TableViewCell cell = (TableViewCell)tableView.DequeueReusableCell(cellIdentifier); if (cell == null) { //cell = new TableViewCell (UITableViewCellStyle.Default, cellIdentifier); //tableViewCell = new TableViewCell (); tableViewCell = new TableViewCell(UITableViewCellStyle.Default, cellIdentifier); tableViewCell.Frame = new RectangleF(0, 0, 320, 0); // Este era el problema ! //tableViewCell.UserInteractionEnabled = true; //tableViewCell.ContentMode =UIViewContentMode.ScaleToFill; //tableViewCell.ContentStretch = new RectangleF(0, 0, 1, 1); //tableViewCell.horizontalTableView=[[UITableView alloc] initWithFrame:CGRectMake(0, 0, 320, 320)]; //tableViewCell.horizontalTableView=new UITableView(new RectangleF(0, 0, 320, 320)); //tableViewCell.horizontalTableView.dataSource=tableViewCell; tableViewCell.horizontalTableView = new UITableView(); tableViewCell.horizontalTableView.Source = new TableViewCell.MyTableViewDelegate(tableViewCell); //tableViewCell.horizontalTableView.delegate=tableViewCell; tableViewCell.AddSubview(tableViewCell.horizontalTableView); //tableViewCell.horizontalTableView.frame=CGRectMake(0, 0, 100 , 320); tableViewCell.horizontalTableView.Frame = new RectangleF(0, 0, 0, 320); // tableViewCell.horizontalTableView.AllowsSelection = true; // tableViewCell.horizontalTableView.AlwaysBounceVertical = true; // tableViewCell.horizontalTableView.AlwaysBounceHorizontal = false; // tableViewCell.horizontalTableView.ContentMode =UIViewContentMode.ScaleToFill; // tableViewCell.horizontalTableView.ContentStretch = new RectangleF(0, 0, 1, 1); // tableViewCell.horizontalTableView.DelaysContentTouches = false; // tableViewCell.horizontalTableView.ScrollEnabled = true; //tableViewCell.horizontalTableView. //tableViewCell.horizontalTableView.DirectionalLockEnabled = false; tableViewCell.horizontalTableView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; //tableViewCell.horizontalTableView.AutoresizingMask //tableViewCell.horizontalTableView.userInteractionEnabled = YES; //tableViewCell.horizontalTableView.SeparatorStyle=UITableViewCellSeparatorStyle.None; //tableViewCell.horizontalTableView.AlwaysBounceHorizontal=false; //tableViewCell.horizontalTableView.AlwaysBounceVertical = true; //tableViewCell.horizontalTableView.AlwaysBounceHorizontal = false; //tableViewCell.horizontalTableView.ScrollEnabled = true; //tableViewCell.horizontalTableView.ShowsHorizontalScrollIndicator=true; //tableViewCell.horizontalTableView.DirectionalLockEnabled = true; //tableViewCell.horizontalTableView.DelaysContentTouches=true; tableViewCell.horizontalTableView.CanCancelContentTouches = false; //tableViewCell.horizontalTableView. CGAffineTransform rotateTable = CGAffineTransform.MakeRotation(-3.141f * 0.5f); tableViewCell.horizontalTableView.Transform = rotateTable; tableViewCell.horizontalTableView.Frame = new RectangleF ( 0, 0, tableViewCell.horizontalTableView.Frame.Size.Width, tableViewCell.horizontalTableView.Frame.Size.Height ); //tableViewCell.contentArray = [arrays objectAtIndex:indexPath.section]; tableViewCell.contentArray = controller.arrays [indexPath.Section]; //cell = [tableViewCell retain]; cell = tableViewCell; //self.tableViewCell = nil; } // cell.Frame=new RectangleF(0,0,768,220); // // // CGAffineTransform rotateTable = CGAffineTransform.MakeRotation(-3.141f * 0.5f); // cell.horizontalTableView.Transform = rotateTable; // cell.horizontalTableView.Frame = new RectangleF(0, 0, // cell.Frame.Size.Width, // cell.Frame.Size.Height); // cell.horizontalTableView.AllowsSelection=true; // cell.horizontalTableView.AllowsMultipleSelection=false; // cell.horizontalTableView.ScrollEnabled=true; //cell.horizontalTableView.DelaysContentTouches=false; // cell.horizontalTableView.CanCancelContentTouches=true; //cell.horizontalTableView.Transform.Rotate(-3.141f * 0.5f); //cell.Transform.Rotate //cell.Transform.Rotate(-3.141f * 0.5f); // Configure the cell. //cell.TextLabel.Text = NSBundle.MainBundle.LocalizedString ("Detail", "Detail"); //cell.contentArray = controller.arrays[indexPath.Section]; return(cell); }
public MyTableViewDelegate(TableViewCell tableViewCell) { this.tableViewCell = tableViewCell; }