equal
deleted
inserted
replaced
95 [UIView beginAnimations:@"inserting main controller" context:NULL]; |
95 [UIView beginAnimations:@"inserting main controller" context:NULL]; |
96 [UIView setAnimationDuration:1]; |
96 [UIView setAnimationDuration:1]; |
97 self.view.alpha = 1; |
97 self.view.alpha = 1; |
98 [UIView commitAnimations]; |
98 [UIView commitAnimations]; |
99 |
99 |
100 // this is a silly way to hide the sdl contex that remained active |
100 [NSTimer scheduledTimerWithTimeInterval:0.7 target:self selector:@selector(hideBehind) userInfo:nil repeats:NO]; |
101 if (nil == cover) { |
|
102 cover= [[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; |
|
103 cover.backgroundColor = [UIColor blackColor]; |
|
104 } |
|
105 [[SDLUIKitDelegate sharedAppDelegate].uiwindow insertSubview:cover belowSubview:self.view]; |
|
106 } |
101 } |
107 |
102 |
108 -(void) disappear { |
103 -(void) disappear { |
109 if (nil != cover) |
104 if (nil != cover) |
110 [cover release]; |
105 [cover release]; |
114 self.view.alpha = 0; |
109 self.view.alpha = 0; |
115 [UIView commitAnimations]; |
110 [UIView commitAnimations]; |
116 |
111 |
117 [self retain]; |
112 [self retain]; |
118 [self.view removeFromSuperview]; |
113 [self.view removeFromSuperview]; |
|
114 } |
|
115 |
|
116 // this is a silly way to hide the sdl contex that remained active |
|
117 -(void) hideBehind { |
|
118 if (nil == cover) { |
|
119 cover= [[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; |
|
120 cover.backgroundColor = [UIColor blackColor]; |
|
121 } |
|
122 [[SDLUIKitDelegate sharedAppDelegate].uiwindow insertSubview:cover belowSubview:self.view]; |
119 } |
123 } |
120 |
124 |
121 #pragma mark - |
125 #pragma mark - |
122 -(IBAction) switchViews:(id) sender { |
126 -(IBAction) switchViews:(id) sender { |
123 UIButton *button = (UIButton *)sender; |
127 UIButton *button = (UIButton *)sender; |