Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

cell stuff

  • Loading branch information...
commit 681f8981360b83644d31c9ccde6e443664aa2c90 1 parent 2c1f7c2
@echoz authored
Showing with 8 additions and 15 deletions.
  1. +2 −2 JOGridViewCell.h
  2. +6 −13 JOGridViewCell.m
View
4 JOGridViewCell.h
@@ -9,8 +9,8 @@
#import <UIKit/UIKit.h>
@interface JOGridViewCell : UIView {
- NSString *__reuseIdentifier;
- UILabel *textLabel;
+ NSString* __reuseIdentifier;
+ UILabel* textLabel;
}
@property (readonly) UILabel *textLabel;
@property (nonatomic, copy) NSString *reuseIdentifier;
View
19 JOGridViewCell.m
@@ -14,16 +14,18 @@ @implementation JOGridViewCell
- (id)initWithFrame:(CGRect)frame
{
- self = [super initWithFrame:frame];
- if (self) {
+ if ((self = [super initWithFrame:frame])) {
// Initialization code
+ self.clipsToBounds = YES;
+
textLabel = [[UILabel alloc] initWithFrame:frame];
textLabel.backgroundColor = [UIColor clearColor];
textLabel.textColor = [UIColor blackColor];
textLabel.textAlignment = UITextAlignmentCenter;
- [self addSubview:textLabel];
textLabel.text = @"";
- self.clipsToBounds = YES;
+
+ [self addSubview:textLabel];
+
}
return self;
}
@@ -38,13 +40,4 @@ -(void)layoutSubviews {
textLabel.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
}
-/*
-// Only override drawRect: if you perform custom drawing.
-// An empty implementation adversely affects performance during animation.
-- (void)drawRect:(CGRect)rect
-{
- // Drawing code
-}
-*/
-
@end
Please sign in to comment.
Something went wrong with that request. Please try again.