forked from nitheeshbinolin/UserTagView
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
24 changed files
with
236 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// TagviewTableCell.h | ||
// TagControl | ||
// | ||
// Created by Nitheesh George on 03/04/15. | ||
// Copyright (c) 2015 Nitheesh George. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
#define IDENTIFIER_TAGS_CELL (@"TagTextViewCell") | ||
|
||
@interface TagviewTableCell : UITableViewCell | ||
|
||
@property (nonatomic, strong) IBOutlet UIImageView * imageView; | ||
@property (nonatomic, strong) IBOutlet UILabel * titleLabel; | ||
@property (nonatomic, assign) CGFloat profileImageHeight; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// | ||
// TagviewTableCell.m | ||
// TagControl | ||
// | ||
// Created by Nitheesh George on 03/04/15. | ||
// Copyright (c) 2015 Nitheesh George. All rights reserved. | ||
// | ||
|
||
#import "TagviewTableCell.h" | ||
#define PROFILE_IMAGE_HEIGHT (40.0f) | ||
|
||
@implementation TagviewTableCell | ||
|
||
@synthesize imageView = _imageView; | ||
@synthesize titleLabel = _titleLabel; | ||
|
||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier | ||
{ | ||
self= [super initWithStyle:style reuseIdentifier:reuseIdentifier]; | ||
if(self) | ||
{ | ||
_profileImageHeight = PROFILE_IMAGE_HEIGHT; | ||
} | ||
|
||
return self; | ||
} | ||
|
||
- (void) awakeFromNib | ||
{ | ||
[super awakeFromNib]; | ||
_profileImageHeight = PROFILE_IMAGE_HEIGHT; | ||
} | ||
|
||
- (void)layoutSubviews | ||
{ | ||
[super layoutSubviews]; | ||
self.imageView.frame = CGRectMake(0, 0, _profileImageHeight, _profileImageHeight); | ||
|
||
CALayer * layer = self.imageView.layer; | ||
layer.cornerRadius = _profileImageHeight / 2.0f; | ||
layer.borderWidth = 2.0f; | ||
layer.borderColor = [UIColor whiteColor].CGColor; | ||
layer.masksToBounds = TRUE; | ||
} | ||
|
||
- (void) dealloc | ||
{ | ||
[_imageView release]; | ||
[_titleLabel release]; | ||
|
||
[super dealloc]; | ||
} | ||
|
||
@end |
Oops, something went wrong.