Skip to content

Commit

Permalink
Use autoreleased labels for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
pokeb committed Sep 4, 2009
1 parent 93ed182 commit 3fd22a0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Classes/ASIAuthenticationDialog.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ - (void)show

// Setup the title (Couldn't figure out how to put this in the same toolbar as the buttons)
UIToolbar *titleBar = [[[UIToolbar alloc] initWithFrame:CGRectMake(0,0,320,30)] autorelease];
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10,0,300,30)];
UILabel *label = [[[UILabel alloc] initWithFrame:CGRectMake(10,0,300,30)] autorelease];
if ([self type] == ASIProxyAuthenticationType) {
[label setText:@"Login to this secure proxy server."];
} else {
Expand All @@ -79,7 +79,6 @@ - (void)show
[label setTextAlignment:UITextAlignmentCenter];

[titleBar addSubview:label];
[label release];
[[self loginDialog] addSubview:titleBar];

// Setup the toolbar
Expand All @@ -89,7 +88,7 @@ - (void)show
UIBarButtonItem *backButton = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(cancelAuthenticationFromDialog:)] autorelease];
[items addObject:backButton];

label = [[UILabel alloc] initWithFrame:CGRectMake(0,0,170,50)];
label = [[[UILabel alloc] initWithFrame:CGRectMake(0,0,170,50)] autorelease];
if ([self type] == ASIProxyAuthenticationType) {
[label setText:[[self request] proxyHost]];
} else {
Expand All @@ -104,7 +103,6 @@ - (void)show
[label setTextAlignment:UITextAlignmentCenter];

[toolbar addSubview:label];
[label release];

UIBarButtonItem *labelButton = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:nil action:nil] autorelease];
[labelButton setCustomView:label];
Expand Down

0 comments on commit 3fd22a0

Please sign in to comment.