Skip to content

Commit

Permalink
Darken TKAlertViewController background when shown.
Browse files Browse the repository at this point in the history
  • Loading branch information
devinross committed Jan 28, 2014
1 parent a9608c5 commit a393907
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion demo/Classes/IndicatorsViewController.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ - (id) init{
#pragma mark View Lifecycle #pragma mark View Lifecycle
- (void) loadView{ - (void) loadView{
[super loadView]; [super loadView];
self.view.backgroundColor = [UIColor colorWithWhite:0.7 alpha:1]; self.view.backgroundColor = [UIColor colorWithWhite:1 alpha:1];


[self.view addSubview:self.progressBar]; [self.view addSubview:self.progressBar];
[self.view addSubview:self.progressCircle]; [self.view addSubview:self.progressCircle];
Expand Down
3 changes: 3 additions & 0 deletions src/TapkuLibrary/TKAlertViewController.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ - (void) showAlertView:(id<UIViewControllerContextTransitioning>)transitionConte


[UIView animateWithDuration:[self transitionDuration:transitionContext] animations:^{ [UIView animateWithDuration:[self transitionDuration:transitionContext] animations:^{
toVC.view.alpha = 1; toVC.view.alpha = 1;
toVC.view.backgroundColor = [UIColor colorWithWhite:0 alpha:0.1];
}]; }];




Expand Down Expand Up @@ -180,6 +181,8 @@ - (void) hideAlertView:(id<UIViewControllerContextTransitioning>)transitionConte


[UIView animateWithDuration:0.4 delay:0.5f options:0 animations:^{ [UIView animateWithDuration:0.4 delay:0.5f options:0 animations:^{
self.view.alpha = 0; self.view.alpha = 0;
self.view.backgroundColor = [UIColor colorWithWhite:0 alpha:0.0];

}completion:^(BOOL finished){ }completion:^(BOOL finished){
[transitionContext completeTransition:YES]; [transitionContext completeTransition:YES];
}]; }];
Expand Down

0 comments on commit a393907

Please sign in to comment.