Skip to content
Elijah Frederickson edited this page Jun 16, 2014 · 4 revisions

The CKPersonCell is a very useful tool for showing professional twitter links.

To use:

  • Subclass CKPersonCell
  • Add required information
  • Use in settings specifiers

Example:

@interface JohnPersonCell : SKPersonCell
@end
@implementation  JohnPersonCell
-(NSString*)personDescription { return @"This guy is helpful"; }
-(NSString*)name { return @"John Smith"; }
-(NSString*)twitterHandle { return @"john_smith"; }
-(NSString*)imageName { return @"john_smith@2x.png"; } /* should be a circular image, 200x200 retina */
@end

And then, use in your specifier:

@{
    @"cell": @"PSLinkCell",
    @"cellClass": @"JohnPersonCell",
    @"height": @100,
    @"action": @"openJohnTwitter"
}

Currently, height is required, and must be 100.

Then implement the openJohnTwitter (although you could change it to GitHub, email, website, etc):
NOTE: must be in your ListController class, not the JohnPersonCell class

-(void) openJohnTwitter
{
    [SKSharedHelper openTwitter:@"john_smith"];
}