Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated for iOS 6 deprecations #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions DCIntrospect/DCFrameView.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ - (id)initWithFrame:(CGRect)frame delegate:(id)aDelegate
self.touchPointLabel = [[[UILabel alloc] initWithFrame:CGRectZero] autorelease];
self.touchPointLabel.text = @"X 320 Y 480";
self.touchPointLabel.font = [UIFont boldSystemFontOfSize:12.0f];
#if defined(__IPHONE_6_0) && (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_6_0)
self.touchPointLabel.textAlignment = NSTextAlignmentCenter;
#else
self.touchPointLabel.textAlignment = UITextAlignmentCenter;
#endif
self.touchPointLabel.textColor = [UIColor whiteColor];
self.touchPointLabel.backgroundColor = [UIColor colorWithWhite:0.0f alpha:0.65f];
self.touchPointLabel.layer.cornerRadius = 5.5f;
Expand Down
2 changes: 2 additions & 0 deletions DCIntrospect/DCIntrospect.m
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,9 @@ - (void)logPropertiesForObject:(id)object
[objectString appendFormat:@" autoresizingMask: %@\n", [self describeProperty:@"autoresizingMask" value:[NSNumber numberWithInt:view.autoresizingMask]]];
[objectString appendFormat:@" autoresizesSubviews: %@\n", (view.autoresizesSubviews) ? @"YES" : @"NO"];
[objectString appendFormat:@" contentMode: %@ | ", [self describeProperty:@"contentMode" value:[NSNumber numberWithInt:view.contentMode]]];
#if !defined(__IPHONE_6_0) || (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0)
[objectString appendFormat:@"contentStretch: %@\n", NSStringFromCGRect(view.contentStretch)];
#endif
[objectString appendFormat:@" backgroundColor: %@\n", [self describeColor:view.backgroundColor]];
[objectString appendFormat:@" alpha: %.2f | ", view.alpha];
[objectString appendFormat:@"opaque: %@ | ", (view.opaque) ? @"YES" : @"NO"];
Expand Down
8 changes: 8 additions & 0 deletions DCIntrospect/DCStatusBarOverlay.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ - (id)init

self.leftLabel = [[[UILabel alloc] initWithFrame:CGRectOffset(self.frame, 2.0f, 0.0f)] autorelease];
self.leftLabel.backgroundColor = [UIColor clearColor];
#if defined(__IPHONE_6_0) && (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_6_0)
self.leftLabel.textAlignment = NSTextAlignmentLeft;
#else
self.leftLabel.textAlignment = UITextAlignmentLeft;
#endif
self.leftLabel.font = [UIFont boldSystemFontOfSize:12.0f];
self.leftLabel.textColor = [UIColor colorWithWhite:0.97f alpha:1.0f];
self.leftLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth;
Expand All @@ -52,7 +56,11 @@ - (id)init
self.rightLabel = [[[UILabel alloc] initWithFrame:CGRectOffset(self.frame, -2.0f, 0.0f)] autorelease];
self.rightLabel.backgroundColor = [UIColor clearColor];
self.rightLabel.font = [UIFont boldSystemFontOfSize:12.0f];
#if defined(__IPHONE_6_0) && (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_6_0)
self.rightLabel.textAlignment = NSTextAlignmentRight;
#else
self.rightLabel.textAlignment = UITextAlignmentRight;
#endif
self.rightLabel.textColor = [UIColor colorWithWhite:0.9f alpha:1.0f];
self.rightLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth;
[self addSubview:self.rightLabel];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ - (void)viewDidLoad
[[DCIntrospect sharedIntrospector] setName:@"activityIndicator" forObject:self.activityIndicator accessedWithSelf:YES];
}

#if !defined(__IPHONE_6_0) || (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0)
- (void)viewDidUnload
{
[self setActivityIndicator:nil];
[self setLabel:nil];

[super viewDidUnload];
}
#endif

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
Expand Down