diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2013-09-30 02:06:42 -0700 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2013-09-30 02:06:42 -0700 |
commit | 6415105ee187c512c2cd85616dbc9b5f41ae402c (patch) | |
tree | b94217a004566b321ad2a2c5cd1a066c29fc6f2c | |
parent | b37b0a4a35e4e0204680ddfa3daa0a3fd86153f2 (diff) |
Fix UISwitch cell position (used to be iOS 4 only).
-rw-r--r-- | MobileCydia.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 12ec4f6..483d7a2 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -5757,6 +5757,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { - (id) initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier { if ((self = [super initWithFrame:frame reuseIdentifier:reuseIdentifier]) != nil) { icon_ = [UIImage applicationImageNamed:@"folder.png"]; + // XXX: this initial frame is wrong, but is fixed later switch_ = [[[UISwitch alloc] initWithFrame:CGRectMake(218, 9, 60, 25)] autorelease]; [switch_ addTarget:self action:@selector(onSwitch:) forEvents:UIControlEventValueChanged]; @@ -5821,7 +5822,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [super setFrame:frame]; CGRect rect([switch_ frame]); - [switch_ setFrame:CGRectMake(frame.size.width - 102, 9, rect.size.width, rect.size.height)]; + [switch_ setFrame:CGRectMake(frame.size.width - rect.size.width - 9, 9, rect.size.width, rect.size.height)]; } - (NSString *) accessibilityLabel { |