我整合Pushwoosh SDK推送通知,这是使用UIWindow
表示从Pushwoosh门户开关两者之间的UIWindow的
- (void) showWebView {
self.richPushWindow.alpha = 0.0f;
self.richPushWindow.windowLevel = UIWindowLevelStatusBar + 1.0f;
self.richPushWindow.hidden = NO;
self.richPushWindow.transform = CGAffineTransformMakeScale(0.01, 0.01);
[UIView animateWithDuration:0.3 animations:^{
self.richPushWindow.transform = CGAffineTransformIdentity;
self.richPushWindow.alpha = 1.0f;
} completion:^(BOOL finished) {
}];
}
- (void) showPushPage:(NSString *)pageId {
NSString *url = [NSString stringWithFormat:kServiceHtmlContentFormatUrl, pageId];
HtmlWebViewController *vc = [[HtmlWebViewController alloc] initWithURLString:url];
vc.delegate = self;
vc.supportedOrientations = supportedOrientations;
self.richPushWindow.rootViewController = vc;
[vc view];
}
而且在关闭HTML页面上发送的HTML页面调用
self.richPushWindow.transform = CGAffineTransformIdentity;
[UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{
self.richPushWindow.transform = CGAffineTransformMakeScale(0.01, 0.01);
self.richPushWindow.alpha = 0.0f;
} completion:^(BOOL finished) {
AppDelegate * appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
self.richPushWindow.hidden = YES;
}];
现在我想在关闭这个HTML页面时调用我的视图控制器。所以我试图在这个区块完成但不出示myviewcotrlller
。
其实这里的问题是,我的应用程序中有两个UIWindows其中一个应用程序和其他sdk使用。现在,如果我尝试从这个HTML页面呈现视图控制器,这是在单独的UIWindow,所以它创建一个单独的层次结构,当我关闭这个窗口也由于父 - 子关系删除我提交的viewconroller。如果不关闭这个窗口,那么如何回到实际的应用程序流程。
我希望新控制器应该从新窗口出现,之后窗口应该关闭,应用程序的流程不应该受到额外窗口的影响。可能吗?如果我的观念是错误的,请帮助,如果任何人有想法
编辑:秒的UIWindow永远是关键的窗口,它只是通过设置较高的windowlevel,成为隐藏
感谢您的回答,为我工作得很好 – Archive 2013-04-30 11:39:23