From 6415105ee187c512c2cd85616dbc9b5f41ae402c Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 30 Sep 2013 02:06:42 -0700 Subject: Fix UISwitch cell position (used to be iOS 4 only). --- MobileCydia.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'MobileCydia.mm') 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 { -- cgit v1.2.3