Skip to content

Commit

Permalink
Formatting, Auto layout tweaks, content inset tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Collin Ruffenach committed Apr 14, 2014
1 parent 4e0fdd3 commit 41778f8
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 36 deletions.
2 changes: 1 addition & 1 deletion CRToast/CRToast.m
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ + (void)setDefaultOptions:(NSDictionary*)defaultOptions {
if (defaultOptions[kCRToastTextShadowOffsetKey]) kCRTextShadowOffsetDefault = [defaultOptions[kCRToastTextShadowOffsetKey] CGSizeValue];
if (defaultOptions[kCRToastTextMaxNumberOfLinesKey]) kCRTextMaxNumberOfLinesDefault = [defaultOptions[kCRToastTextMaxNumberOfLinesKey] integerValue];

if (defaultOptions[kCRToastStatusBarStyleKey]) kCRStatusBarStyleDefault = [defaultOptions[kCRToastStatusBarStyleKey] integerValue];
if (defaultOptions[kCRToastStatusBarStyleKey]) kCRStatusBarStyleDefault = [defaultOptions[kCRToastStatusBarStyleKey] integerValue];

if (defaultOptions[kCRToastSubtitleTextKey]) kCRSubtitleTextDefault = defaultOptions[kCRToastSubtitleTextKey];
if (defaultOptions[kCRToastSubtitleFontKey]) kCRSubtitleFontDefault = defaultOptions[kCRToastSubtitleFontKey];
Expand Down
6 changes: 3 additions & 3 deletions CRToastDemo/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ @implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[CRToastManager setDefaultOptions:@{kCRToastNotificationTypeKey : @(CRToastTypeNavigationBar),
kCRToastFontKey : [UIFont fontWithName:@"HelveticaNeue-Light" size:16],
kCRToastTextColorKey : [UIColor whiteColor],
kCRToastBackgroundColorKey : [UIColor orangeColor]}];
kCRToastFontKey : [UIFont fontWithName:@"HelveticaNeue-Light" size:16],
kCRToastTextColorKey : [UIColor whiteColor],
kCRToastBackgroundColorKey : [UIColor orangeColor]}];

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
Expand Down
4 changes: 2 additions & 2 deletions CRToastDemo/MainViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ - (void)keyboardWillShow:(NSNotification*)notification {
0);
self.scrollView.scrollIndicatorInsets = self.scrollView.contentInset;
self.scrollView.contentSize = CGSizeMake(CGRectGetWidth(self.contentView.frame),
CGRectGetMaxY(self.showNotificationButton.frame));
CGRectGetMaxY(self.dismissNotificationButton.frame));
}

- (void)keyboardWillHide:(NSNotification*)notification {
Expand All @@ -139,7 +139,7 @@ - (void)keyboardWillHide:(NSNotification*)notification {
0);
self.scrollView.scrollIndicatorInsets = self.scrollView.contentInset;
self.scrollView.contentSize = CGSizeMake(CGRectGetWidth(self.contentView.frame),
CGRectGetMaxY(self.showNotificationButton.frame));
CGRectGetMaxY(self.dismissNotificationButton.frame));
}

- (void)orientationChanged:(NSNotification*)notification {
Expand Down
Loading

0 comments on commit 41778f8

Please sign in to comment.