Skip to content
Browse files

Backward compatibility for iOS 4.3.3

  • Loading branch information...
1 parent 79170a7 commit 7f7d5fc399fd156b0b1d6b424e965f4d755c726b @ccp0101 committed Nov 13, 2011
View
7 iTransmission/ITFilesInspectorViewController.m
@@ -47,7 +47,9 @@ - (void)loadView
[self.view addSubview:self.tableView];
self.tableView.delegate = self;
self.tableView.dataSource = self;
- [self.tableView registerNib:[UINib nibWithNibName:@"ITFileInspectorCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"ITFileInspectorCell"];
+ if ([self.tableView respondsToSelector:@selector(registerNib:forCellReuseIdentifier:)]) {
+ [self.tableView registerNib:[UINib nibWithNibName:@"ITFileInspectorCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"ITFileInspectorCell"];
+ }
}
- (void)registerNotifications
@@ -104,6 +106,9 @@ - (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NS
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
ITFileInspectorCell *cell = (ITFileInspectorCell*)[tableView dequeueReusableCellWithIdentifier:@"ITFileInspectorCell"];
+ if (! [self.tableView respondsToSelector:@selector(registerNib:forCellReuseIdentifier:)]) {
+ cell = (ITFileInspectorCell*)[[[NSBundle mainBundle] loadNibNamed:@"ITFileInspectorCell" owner:nil options:nil] objectAtIndex:0];
+ }
assert(cell);
if ([[cell.checkmarkControl allTargets] containsObject:self] == NO) {
View
5 iTransmission/ITNavigationController.m
@@ -36,8 +36,9 @@ - (id)initWithRootViewController:(UIViewController *)rootViewController
self.rootViewController = rootViewController;
self.navigationBar.tintColor = [UIColor barBlueColor];
UIImage *barBackground = [UIImage imageNamed:@"bar-bg.png"];
- [self.navigationBar setBackgroundImage:barBackground forBarMetrics:UIBarMetricsDefault];
-
+ if ([self.navigationBar respondsToSelector:@selector(setBackgroundImage:forBarMetrics:)]) {
+ [self.navigationBar setBackgroundImage:barBackground forBarMetrics:UIBarMetricsDefault];
+ }
}
return self;
}
View
11 iTransmission/ITRoundProgressView.m
@@ -62,7 +62,16 @@ - (void)drawRect:(CGRect)rect {
CGContextRef context = UIGraphicsGetCurrentContext();
CGFloat red, green, blue, alpha;
- [self.progressColor getRed:&red green:&green blue:&blue alpha:&alpha];
+ if ([self.progressColor respondsToSelector:@selector(getRed:green:blue:alpha:)]) {
+ [self.progressColor getRed:&red green:&green blue:&blue alpha:&alpha];
+ }
+ else {
+ const CGFloat* components = CGColorGetComponents(self.progressColor.CGColor);
+ red = components[0];
+ green = components[1];
+ blue = components[2];
+ alpha = CGColorGetAlpha(self.progressColor.CGColor);
+ }
// Draw background
CGContextSetRGBStrokeColor(context, red, green, blue, 1.0f);
View
11 iTransmission/ITTransfersViewController.m
@@ -63,8 +63,10 @@ - (void)loadView
self.tableView.dataSource = self;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.tableView.backgroundColor = [UIColor clearColor];
-
- [self.tableView registerNib:[UINib nibWithNibName:@"ITTransferCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:[ITTransferCell identifier]];
+
+ if ([self.tableView respondsToSelector:@selector(registerNib:forCellReuseIdentifier:)]) {
+ [self.tableView registerNib:[UINib nibWithNibName:@"ITTransferCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:[ITTransferCell identifier]];
+ }
[self.view addSubview:self.tableView];
}
@@ -171,8 +173,9 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
- (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
ITTransferCell *cell = (ITTransferCell*)[tableView dequeueReusableCellWithIdentifier:[ITTransferCell identifier]];
- assert(cell);
-
+ if (! [self.tableView respondsToSelector:@selector(registerNib:forCellReuseIdentifier:)]) {
+ if (cell == nil) cell = [[[NSBundle mainBundle] loadNibNamed:@"ITTransferCell" owner:nil options:nil] objectAtIndex:0];
+ }
ITTorrent *torrent = [self.displayedTorrents objectAtIndex:indexPath.row];
[self fillInCell:cell withTorrent:torrent];
View
4 iTransmission/Info/about.html
@@ -22,7 +22,7 @@
<span class="graytitle">About iTransmission</span>
<ul class="pageitem">
<li class="textbox"><span class="header">What is it?</span>
- <p>iTransmission is a native BitTorrent client for iOS. It's free and open source. It uses the same backend as the one used byTransmission on Mac OS X.</p>
+ <p>iTransmission is a native BitTorrent client for iOS. It's free and open source. It uses the same backend as the one used by Transmission on Mac OS X.</p>
<span class="header">Homepage</span>
<p><a href="http://code.google.com/p/itransmission/">http://code.google.com/p/itransmission</a></p>
<span class="header">Version</span>
@@ -53,7 +53,7 @@
<span class="header">Credit</span>
<p>Mike Chen (@ccp0101 on Twitter) -- Author</p>
<p>Hans Felsh (<a href="mailto:hfelsh@gmail.com">hfelsh@gmail.com</a>) -- Testing</p>
- <p>Mathieu Bolard (<a href="mailto:me@mathieubolard.com">hme@mathieubolard.com</a>) -- Icons and tweaks</p>
+ <p>Mathieu Bolard (<a href="mailto:me@mathieubolard.com">me@mathieubolard.com</a>) -- Icons and tweaks</p>
<p><p>
</li>
</ul>

0 comments on commit 7f7d5fc

Please sign in to comment.
Something went wrong with that request. Please try again.