Skip to content

Commit

Permalink
ios sdk: remove an extra retain and a warning msg
Browse files Browse the repository at this point in the history
  • Loading branch information
Yujuan Bao committed Aug 25, 2010
1 parent 84ab740 commit 175bf48
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions src/FBDialog.m
Expand Up @@ -317,12 +317,15 @@ - (id)init {
[_closeButton setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
[_closeButton addTarget:self action:@selector(cancel)
forControlEvents:UIControlEventTouchUpInside];
if ([_closeButton respondsToSelector:@selector(titleLabel)]) {
_closeButton.titleLabel.font = [UIFont boldSystemFontOfSize:12];
} else { // This triggers a deprecation warning but at least it will work on OS 2.x
_closeButton.font = [UIFont boldSystemFontOfSize:12];
}
_closeButton.showsTouchWhenHighlighted = YES;

// To be compatible with OS 2.x
#if __IPHONE_OS_VERSION_MAX_ALLOWED <= __IPHONE_2_2
_closeButton.font = [UIFont boldSystemFontOfSize:12];
#else
_closeButton.titleLabel.font = [UIFont boldSystemFontOfSize:12];
#endif

_closeButton.showsTouchWhenHighlighted = YES;
_closeButton.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin
| UIViewAutoresizingFlexibleBottomMargin;
[self addSubview:_closeButton];
Expand Down
2 changes: 1 addition & 1 deletion src/FBRequest.m
Expand Up @@ -268,7 +268,7 @@ - (void)connect {
[request setHTTPBody:[self generatePostBody]];
}

_connection = [[[NSURLConnection alloc] initWithRequest:request delegate:self] retain];
_connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];

}

Expand Down

0 comments on commit 175bf48

Please sign in to comment.