Posts

Showing posts from June, 2013

Custom Editing Control for UITableViewCell , like iPhone Mail Appliation

Image
Dear Friends, Today, while I was developing a application, I found that I am in need to a custom Editing control. Custom Editing Control are displayed on the left side of the screen. IOS sdk provides two of such kind which we use most of the time UITableViewCellEditingStyleDelete & UITableViewCellEditingStyleInsert  . I will be now discussing the third one, UITableViewCellEditingStyleNone. This can be used to design our own Editing control. How this is going to look like can be fond from below screen shot. Steps to achieve this can be found below: STEP 1: Create A subclass of UITabelViewCell First create a subclass of UITableViewCell, where when the cell object is initialised we will have to add a UIButton to its view. You will also need a offset variable, whose value will be 32.0 in all iPhones. -( id ) initWithCoder:( NSCoder *)aDecoder{          self =[ super initWithCoder :aDecoder];          if ( self ){         offset =32.0;