CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.

RJContactDetailsView 0.0.2

RJContactDetailsView 0.0.2

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by rayjune.



  • By
  • rayjune

RJContactDetailsView is a beautiful view for displaying contact information including head image,name and phone numbers.

Screenshot

Resize icon

Install

Manually

Download the zip of the project and put the classes RJContactDetailsView.h and RJContactDetailsView.m in your project. There a simple model:RJContact.h and RJContact.m in the demo.It is a model to show the view.

How to use

#import "RJContactDetailsView.h"

RJContactDetailsView *contactDetailsView = [[RJContactDetailsView alloc] initWithHeadImage:[UIImage imageNamed:@"head"] contactName:@"rayjune" phones:@[@"15088888888",@"15067755555"]];
{
    //set appearance
    contactDetailsView.topBarColor = [UIColor blueColor];
    contactDetailsView.intoDetailsButtonNormalTextColor = [UIColor blackColor];
    contactDetailsView.intoDetailsButtonHightlightedTextColor = [UIColor lightTextColor];
    contactDetailsView.contactNameLabelTextColor = [UIColor blackColor];
    contactDetailsView.intoDetailsButtonTitle = @"More details";

    contactDetailsView.headImage = [UIImage imageNamed:@"head"];
    contactDetailsView.contactName = @"rayjune";
}
contactDetailsView.dataSource = self;
contactDetailsView.delegate = self;
[contactDetailsView show];

Delegate and Datasource

#pragma mark - RJContactDetailsView DataSource
- (UITableViewCell *)contactTableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath phones:(NSArray *)phones
{
    static NSString *cellID = @"CellID";
    UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
    cell.textLabel.textColor = [UIColor blackColor];
    cell.textLabel.font = [UIFont boldSystemFontOfSize:18];
    cell.textLabel.text = phones[indexPath.row];
    return cell;
}

#pragma mark - RJContactDetailsView Delegate
- (void)contactTableViewDidSelectPhone:(NSString *)phone
{
    NSLog(@"You touched %@!",phone);
}
- (void)contactDetailsViewDidTouchedIntoDetails:(RJContactDetailsView *)contactDetailsView
{
    NSLog(@"You touched into more details button!");
}

License

In fact,you can use these codes in any ways.I will be glad if you fork or star it.