Skip to content
This repository has been archived by the owner on Mar 9, 2018. It is now read-only.

Commit

Permalink
Refactoring the code to make it even quicker and images support! Chec…
Browse files Browse the repository at this point in the history
…k the site soon.
  • Loading branch information
Alex Barinov authored and Alex Barinov committed Oct 7, 2012
1 parent 147c39b commit bdd0213
Show file tree
Hide file tree
Showing 21 changed files with 369 additions and 667 deletions.
30 changes: 16 additions & 14 deletions example/UIBubbleTableViewExample.xcodeproj/project.pbxproj
Expand Up @@ -7,7 +7,9 @@
objects = {

/* Begin PBXBuildFile section */
760D63931621BF100026FA70 /* fields.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 760D63921621BF100026FA70 /* fields.jpg */; };
76687AFD1622039C00707588 /* UIBubbleTypingTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 76687AFC1622039C00707588 /* UIBubbleTypingTableViewCell.m */; };
76687AFF162203AF00707588 /* halloween.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 76687AFE162203AF00707588 /* halloween.jpg */; };
76D097CC1621F0E000C17816 /* UIBubbleHeaderTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 76D097CB1621F0E000C17816 /* UIBubbleHeaderTableViewCell.m */; };
76ED206315BF096C00E186D3 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76ED206215BF096C00E186D3 /* UIKit.framework */; };
76ED206515BF096C00E186D3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76ED206415BF096C00E186D3 /* Foundation.framework */; };
76ED206715BF096C00E186D3 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76ED206615BF096C00E186D3 /* CoreGraphics.framework */; };
Expand All @@ -18,9 +20,7 @@
76ED207915BF096C00E186D3 /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76ED207715BF096C00E186D3 /* ViewController.xib */; };
76ED208715BF09E300E186D3 /* UIBubbleTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 76ED208615BF09E300E186D3 /* UIBubbleTableView.m */; };
76ED208B15BF0BB100E186D3 /* NSBubbleData.m in Sources */ = {isa = PBXBuildFile; fileRef = 76ED208A15BF0BB100E186D3 /* NSBubbleData.m */; };
76ED209115BF263600E186D3 /* NSBubbleDataInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = 76ED209015BF263600E186D3 /* NSBubbleDataInternal.m */; };
76ED209415BF29EE00E186D3 /* UIBubbleTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 76ED209315BF29EE00E186D3 /* UIBubbleTableViewCell.m */; };
76ED209615BF2A1400E186D3 /* UIBubbleTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76ED209515BF2A1400E186D3 /* UIBubbleTableViewCell.xib */; };
C83B107915DE43180067DADE /* bubbleMine.png in Resources */ = {isa = PBXBuildFile; fileRef = C83B107115DE43180067DADE /* bubbleMine.png */; };
C83B107A15DE43180067DADE /* bubbleMine@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C83B107215DE43180067DADE /* bubbleMine@2x.png */; };
C83B107B15DE43180067DADE /* bubbleSomeone.png in Resources */ = {isa = PBXBuildFile; fileRef = C83B107315DE43180067DADE /* bubbleSomeone.png */; };
Expand All @@ -34,7 +34,11 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
760D63921621BF100026FA70 /* fields.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = fields.jpg; sourceTree = SOURCE_ROOT; };
76687AFB1622039C00707588 /* UIBubbleTypingTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIBubbleTypingTableViewCell.h; path = ../../src/UIBubbleTypingTableViewCell.h; sourceTree = "<group>"; };
76687AFC1622039C00707588 /* UIBubbleTypingTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UIBubbleTypingTableViewCell.m; path = ../../src/UIBubbleTypingTableViewCell.m; sourceTree = "<group>"; };
76687AFE162203AF00707588 /* halloween.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = halloween.jpg; sourceTree = SOURCE_ROOT; };
76D097CA1621F0E000C17816 /* UIBubbleHeaderTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIBubbleHeaderTableViewCell.h; path = ../../src/UIBubbleHeaderTableViewCell.h; sourceTree = "<group>"; };
76D097CB1621F0E000C17816 /* UIBubbleHeaderTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UIBubbleHeaderTableViewCell.m; path = ../../src/UIBubbleHeaderTableViewCell.m; sourceTree = "<group>"; };
76ED205E15BF096C00E186D3 /* UIBubbleTableViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UIBubbleTableViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
76ED206215BF096C00E186D3 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
76ED206415BF096C00E186D3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
Expand All @@ -53,11 +57,8 @@
76ED208815BF0B4400E186D3 /* UIBubbleTableViewDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = UIBubbleTableViewDataSource.h; path = ../../src/UIBubbleTableViewDataSource.h; sourceTree = "<group>"; };
76ED208915BF0BB100E186D3 /* NSBubbleData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSBubbleData.h; path = ../../src/NSBubbleData.h; sourceTree = "<group>"; };
76ED208A15BF0BB100E186D3 /* NSBubbleData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NSBubbleData.m; path = ../../src/NSBubbleData.m; sourceTree = "<group>"; };
76ED208F15BF263600E186D3 /* NSBubbleDataInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSBubbleDataInternal.h; path = ../../src/NSBubbleDataInternal.h; sourceTree = "<group>"; };
76ED209015BF263600E186D3 /* NSBubbleDataInternal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NSBubbleDataInternal.m; path = ../../src/NSBubbleDataInternal.m; sourceTree = "<group>"; };
76ED209215BF29EE00E186D3 /* UIBubbleTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIBubbleTableViewCell.h; path = ../../src/UIBubbleTableViewCell.h; sourceTree = "<group>"; };
76ED209315BF29EE00E186D3 /* UIBubbleTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UIBubbleTableViewCell.m; path = ../../src/UIBubbleTableViewCell.m; sourceTree = "<group>"; };
76ED209515BF2A1400E186D3 /* UIBubbleTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = UIBubbleTableViewCell.xib; path = ../../src/UIBubbleTableViewCell.xib; sourceTree = "<group>"; };
C83B107115DE43180067DADE /* bubbleMine.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bubbleMine.png; sourceTree = "<group>"; };
C83B107215DE43180067DADE /* bubbleMine@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "bubbleMine@2x.png"; sourceTree = "<group>"; };
C83B107315DE43180067DADE /* bubbleSomeone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bubbleSomeone.png; sourceTree = "<group>"; };
Expand Down Expand Up @@ -129,7 +130,7 @@
76ED206915BF096C00E186D3 /* Supporting Files */ = {
isa = PBXGroup;
children = (
760D63921621BF100026FA70 /* fields.jpg */,
76687AFE162203AF00707588 /* halloween.jpg */,
C86D4FFD15BFEBC1003F161E /* icon_114.png */,
C86D4FFB15BFEBBF003F161E /* icon_57.png */,
76ED206A15BF096C00E186D3 /* UIBubbleTableViewExample-Info.plist */,
Expand All @@ -145,13 +146,14 @@
children = (
76ED208915BF0BB100E186D3 /* NSBubbleData.h */,
76ED208A15BF0BB100E186D3 /* NSBubbleData.m */,
76ED208F15BF263600E186D3 /* NSBubbleDataInternal.h */,
76ED209015BF263600E186D3 /* NSBubbleDataInternal.m */,
76ED208515BF09E300E186D3 /* UIBubbleTableView.h */,
76ED208615BF09E300E186D3 /* UIBubbleTableView.m */,
76ED209215BF29EE00E186D3 /* UIBubbleTableViewCell.h */,
76ED209315BF29EE00E186D3 /* UIBubbleTableViewCell.m */,
76ED209515BF2A1400E186D3 /* UIBubbleTableViewCell.xib */,
76D097CA1621F0E000C17816 /* UIBubbleHeaderTableViewCell.h */,
76D097CB1621F0E000C17816 /* UIBubbleHeaderTableViewCell.m */,
76687AFB1622039C00707588 /* UIBubbleTypingTableViewCell.h */,
76687AFC1622039C00707588 /* UIBubbleTypingTableViewCell.m */,
76ED208815BF0B4400E186D3 /* UIBubbleTableViewDataSource.h */,
);
name = src;
Expand Down Expand Up @@ -225,7 +227,6 @@
files = (
76ED206D15BF096C00E186D3 /* InfoPlist.strings in Resources */,
76ED207915BF096C00E186D3 /* ViewController.xib in Resources */,
76ED209615BF2A1400E186D3 /* UIBubbleTableViewCell.xib in Resources */,
C86D4FFC15BFEBBF003F161E /* icon_57.png in Resources */,
C86D4FFE15BFEBC1003F161E /* icon_114.png in Resources */,
C83B107915DE43180067DADE /* bubbleMine.png in Resources */,
Expand All @@ -236,7 +237,7 @@
C83B107E15DE43180067DADE /* typingMine@2x.png in Resources */,
C83B107F15DE43180067DADE /* typingSomeone.png in Resources */,
C83B108015DE43180067DADE /* typingSomeone@2x.png in Resources */,
760D63931621BF100026FA70 /* fields.jpg in Resources */,
76687AFF162203AF00707588 /* halloween.jpg in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -252,8 +253,9 @@
76ED207615BF096C00E186D3 /* ViewController.m in Sources */,
76ED208715BF09E300E186D3 /* UIBubbleTableView.m in Sources */,
76ED208B15BF0BB100E186D3 /* NSBubbleData.m in Sources */,
76ED209115BF263600E186D3 /* NSBubbleDataInternal.m in Sources */,
76ED209415BF29EE00E186D3 /* UIBubbleTableViewCell.m in Sources */,
76D097CC1621F0E000C17816 /* UIBubbleHeaderTableViewCell.m in Sources */,
76687AFD1622039C00707588 /* UIBubbleTypingTableViewCell.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
3 changes: 0 additions & 3 deletions example/UIBubbleTableViewExample/AppDelegate.h
Expand Up @@ -2,9 +2,6 @@
// AppDelegate.h
//
// Created by Alex Barinov
// StexGroup, LLC
// http://www.stexgroup.com
//
// Project home page: http://alexbarinov.github.com/UIBubbleTableView/
//
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
Expand Down
3 changes: 0 additions & 3 deletions example/UIBubbleTableViewExample/AppDelegate.m
Expand Up @@ -2,9 +2,6 @@
// AppDelegate.m
//
// Created by Alex Barinov
// StexGroup, LLC
// http://www.stexgroup.com
//
// Project home page: http://alexbarinov.github.com/UIBubbleTableView/
//
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
Expand Down
3 changes: 0 additions & 3 deletions example/UIBubbleTableViewExample/ViewController.h
Expand Up @@ -2,9 +2,6 @@
// ViewController.h
//
// Created by Alex Barinov
// StexGroup, LLC
// http://www.stexgroup.com
//
// Project home page: http://alexbarinov.github.com/UIBubbleTableView/
//
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
Expand Down
17 changes: 8 additions & 9 deletions example/UIBubbleTableViewExample/ViewController.m
Expand Up @@ -2,15 +2,17 @@
// ViewController.m
//
// Created by Alex Barinov
// StexGroup, LLC
// http://www.stexgroup.com
//
// Project home page: http://alexbarinov.github.com/UIBubbleTableView/
//
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/
//

//
// Halloween image used in this example by Petr Kratochvil released into public domain
// http://www.publicdomainpictures.net/view-image.php?image=9806&picture=halloween-autumn-theme
//

#import "ViewController.h"
#import "UIBubbleTableView.h"
#import "UIBubbleTableViewDataSource.h"
Expand All @@ -23,12 +25,9 @@ - (void)viewDidLoad
[super viewDidLoad];

bubbleData = [[NSMutableArray alloc] initWithObjects:
[NSBubbleData dataWithText:@"Marge, there's something that I want to ask you, but I'm afraid, because if you say no, it will destroy me and make me a criminal." andDate:[NSDate dateWithTimeIntervalSinceNow:-300] andType:BubbleTypeMine],
[NSBubbleData dataWithText:@"Well, I haven't said no to you yet, have I?" andDate:[NSDate dateWithTimeIntervalSinceNow:-280] andType:BubbleTypeSomeoneElse],
[NSBubbleData dataWithText:@"Marge... Oh, damn it." andDate:[NSDate dateWithTimeIntervalSinceNow:0] andType:BubbleTypeMine],
[NSBubbleData dataWithText:@"What's wrong?" andDate:[NSDate dateWithTimeIntervalSinceNow:300] andType:BubbleTypeSomeoneElse],
[NSBubbleData dataWithText:@"Ohn I wrote down what I wanted to say on a card.." andDate:[NSDate dateWithTimeIntervalSinceNow:395] andType:BubbleTypeMine],
[NSBubbleData dataWithText:@"The stupid thing must have fallen out of my pocket." andDate:[NSDate dateWithTimeIntervalSinceNow:400] andType:BubbleTypeMine],
[NSBubbleData dataWithText:@"Hey, halloween is soon" date:[NSDate dateWithTimeIntervalSinceNow:-300] type:BubbleTypeSomeoneElse],
[NSBubbleData dataWithImage:[UIImage imageNamed:@"halloween.jpg"] date:[NSDate dateWithTimeIntervalSinceNow:-290] type:BubbleTypeSomeoneElse],
[NSBubbleData dataWithText:@"Wow.. Really cool picture out there. iPhone 5 has really nice camera, yeah?" date:[NSDate dateWithTimeIntervalSinceNow:0] type:BubbleTypeMine],
nil];

bubbleTable.bubbleDataSource = self;
Expand Down
8 changes: 5 additions & 3 deletions example/UIBubbleTableViewExample/main.m
@@ -1,9 +1,11 @@
//
// main.m
// UIBubbleTableViewExample
//
// Created by Alex Barinov on 7/24/12.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
// Created by Alex Barinov
// Project home page: http://alexbarinov.github.com/UIBubbleTableView/
//
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/
//

#import <UIKit/UIKit.h>
Expand Down
Binary file added example/halloween.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 7 additions & 8 deletions src/NSBubbleData.h
Expand Up @@ -2,9 +2,6 @@
// NSBubbleData.h
//
// Created by Alex Barinov
// StexGroup, LLC
// http://www.stexgroup.com
//
// Project home page: http://alexbarinov.github.com/UIBubbleTableView/
//
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
Expand All @@ -23,12 +20,14 @@ typedef enum _NSBubbleType

@property (readonly, nonatomic, strong) NSDate *date;
@property (readonly, nonatomic) NSBubbleType type;
@property (readonly, nonatomic, strong) NSString *text;
@property (readonly, nonatomic, strong) UIView *view;
@property (readonly, nonatomic) UIEdgeInsets insets;

- (id)initWithText:(NSString *)text andDate:(NSDate *)date andType:(NSBubbleType)type;
+ (id)dataWithText:(NSString *)text andDate:(NSDate *)date andType:(NSBubbleType)type;
- (id)initWithView:(UIView *)view andDate:(NSDate *)date andType:(NSBubbleType)type;
+ (id)dataWithView:(UIView *)view andDate:(NSDate *)date andType:(NSBubbleType)type;
- (id)initWithText:(NSString *)text date:(NSDate *)date type:(NSBubbleType)type;
+ (id)dataWithText:(NSString *)text date:(NSDate *)date type:(NSBubbleType)type;
- (id)initWithImage:(UIImage *)image date:(NSDate *)date type:(NSBubbleType)type;
+ (id)dataWithImage:(UIImage *)image date:(NSDate *)date type:(NSBubbleType)type;
- (id)initWithView:(UIView *)view date:(NSDate *)date type:(NSBubbleType)type insets:(UIEdgeInsets)insets;
+ (id)dataWithView:(UIView *)view date:(NSDate *)date type:(NSBubbleType)type insets:(UIEdgeInsets)insets;

@end
117 changes: 81 additions & 36 deletions src/NSBubbleData.m
Expand Up @@ -2,9 +2,6 @@
// NSBubbleData.m
//
// Created by Alex Barinov
// StexGroup, LLC
// http://www.stexgroup.com
//
// Project home page: http://alexbarinov.github.com/UIBubbleTableView/
//
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
Expand All @@ -15,46 +12,106 @@

@implementation NSBubbleData

#pragma mark - Properties

@synthesize date = _date;
@synthesize type = _type;
@synthesize text = _text;
@synthesize view = _view;
@synthesize insets = _insets;

#pragma mark - Lifecycle

#if !__has_feature(objc_arc)
- (void)dealloc
{
[_date release];
_date = nil;
[_view release];
_view = nil;
[super dealloc];
}
#endif

#pragma mark - Text bubble

+ (id)dataWithText:(NSString *)text andDate:(NSDate *)date andType:(NSBubbleType)type
const UIEdgeInsets textInsetsMine = {5, 10, 11, 17};
const UIEdgeInsets textInsetsSomeone = {5, 15, 11, 10};

+ (id)dataWithText:(NSString *)text date:(NSDate *)date type:(NSBubbleType)type
{
#if !__has_feature(objc_arc)
return [[[NSBubbleData alloc] initWithText:text andDate:date andType:type] autorelease];
return [[[NSBubbleData alloc] initWithText:text date:date type:type] autorelease];
#else
return [[NSBubbleData alloc] initWithText:text andDate:date andType:type];
return [[NSBubbleData alloc] initWithText:text date:date type:type];
#endif
}

- (id)initWithText:(NSString *)text andDate:(NSDate *)date andType:(NSBubbleType)initType
- (id)initWithText:(NSString *)text date:(NSDate *)date type:(NSBubbleType)type
{
self = [super init];
if (self)
{
UIFont *font = [UIFont systemFontOfSize:[UIFont systemFontSize]];
CGSize size = [(text ? text : @"") sizeWithFont:font constrainedToSize:CGSizeMake(220, 9999) lineBreakMode:UILineBreakModeWordWrap];

UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, size.width, size.height)];
label.numberOfLines = 0;
label.lineBreakMode = UILineBreakModeWordWrap;
label.text = (text ? text : @"");
label.font = font;
label.backgroundColor = [UIColor clearColor];

#if !__has_feature(objc_arc)
_text = [text retain];
_date = [date retain];
#else
_text = text;
_date = date;
[label autorelease];
#endif

UIEdgeInsets insets = (type == BubbleTypeMine ? textInsetsMine : textInsetsSomeone);
return [self initWithView:label date:date type:type insets:insets];
}

if (!_text || [_text isEqualToString:@""]) _text = @" ";

_type = initType;
#pragma mark - Image bubble

const UIEdgeInsets imageInsetsMine = {11, 13, 16, 22};
const UIEdgeInsets imageInsetsSomeone = {11, 18, 16, 14};

+ (id)dataWithImage:(UIImage *)image date:(NSDate *)date type:(NSBubbleType)type
{
#if !__has_feature(objc_arc)
return [[[NSBubbleData alloc] initWithImage:image date:date type:type] autorelease];
#else
return [[NSBubbleData alloc] initWithImage:image date:date type:type];
#endif
}

- (id)initWithImage:(UIImage *)image date:(NSDate *)date type:(NSBubbleType)type
{
CGSize size = image.size;
if (size.width > 220)
{
size.height /= (size.width / 220);
size.width = 220;
}
return self;

UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, size.width, size.height)];
imageView.image = image;

#if !__has_feature(objc_arc)
[imageView autorelease];
#endif

UIEdgeInsets insets = (type == BubbleTypeMine ? imageInsetsMine : imageInsetsSomeone);
return [self initWithView:imageView date:date type:type insets:insets];
}

+ (id)dataWithView:(UIView *)view andDate:(NSDate *)date andType:(NSBubbleType)type
#pragma mark - Custom view bubble

+ (id)dataWithView:(UIView *)view date:(NSDate *)date type:(NSBubbleType)type insets:(UIEdgeInsets)insets
{
return [[[NSBubbleData alloc] initWithView:view andDate:date andType:type] autorelease];
#if !__has_feature(objc_arc)
return [[[NSBubbleData alloc] initWithView:view date:date type:type insets:insets] autorelease];
#else
return [[NSBubbleData alloc] initWithView:view date:date type:type insets:insets];
#endif
}

- (id)initWithView:(UIView *)view andDate:(NSDate *)date andType:(NSBubbleType)type
- (id)initWithView:(UIView *)view date:(NSDate *)date type:(NSBubbleType)type insets:(UIEdgeInsets)insets
{
self = [super init];
if (self)
Expand All @@ -67,21 +124,9 @@ - (id)initWithView:(UIView *)view andDate:(NSDate *)date andType:(NSBubbleType)t
_date = date;
#endif
_type = type;
_insets = insets;
}
return self;
}

#if !__has_feature(objc_arc)
- (void)dealloc
{
[_date release];
[_text release];
_date = nil;
_text = nil;
[_view release];
_view = nil;
[super dealloc];
}
#endif

@end

0 comments on commit bdd0213

Please sign in to comment.