Advertisement
Guest User

Untitled

a guest
Aug 14th, 2015
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 KB | None | 0 0
  1. using System;
  2. using UIKit;
  3. using Foundation;
  4. using CoreGraphics;
  5.  
  6. namespace testernew
  7. {
  8.     public class CustomVegeCell : UITableViewCell  {
  9.         UIImageView imageView;
  10.         public CustomVegeCell (string cellId) : base (UITableViewCellStyle.Default, cellId)
  11.         {
  12.             SelectionStyle = UITableViewCellSelectionStyle.Gray;
  13.             ContentView.BackgroundColor = UIColor.FromRGB (218, 255, 127);
  14.             imageView = new UIImageView();
  15.             ContentView.AddSubviews(new UIView[] {imageView});
  16.  
  17.         }
  18.         public void UpdateCell (UIImage image)
  19.         {
  20.             if (image != null) {
  21.                 imageView.Image = image;
  22.             }
  23.         }
  24.         public override void LayoutSubviews ()
  25.         {
  26.             base.LayoutSubviews ();
  27.             imageView.Frame = new CGRect (30, 5, 200, 200);
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement