结构是这样的,..
*) 主视图
1) viewLocations(UIVIEW) // this one is adding fine a) viewBangalore b) viewHyderbad
实际上,我正在做一个 iPad App ,在其中一个 UIViewController 中,我使用 UiTableController 作为滑动视图来选择 Locations 。根据位置选取,需要显示 UiView 的。
viewLocations --> CGRectMake(0,108,588,533)
这里我的代码是:
if (_detailItem) {
Location=[_detailItem description];
if ([Location isEqual:@"Bangalore"]) {
self.viewLocBangalore= [[UIView alloc] initWithFrame:CGRectMake(10, 10, 500, 400)];
// self.viewLocBangalore.frame = CGRectMake(10, 10, 500, 400);
[self.viewLocations addSubview:self.viewLocBangalore];
[UIView transitionFromView:self.viewLocHyderbad
toView:self.viewLocBangalore
duration:0.9
options:UIViewAnimationOptionTransitionFlipFromBottom
completion:^(BOOL finished) {
NSLog(@"Locations View Appeared %@", Location);
}];
}
else if ([Location isEqual:@"Hyderbad"])
{
self.viewLocHyderbad.frame = CGRectMake(10, 10, 600, 519);
[self.viewLocHyderbad removeFromSuperview];
[self.ViewLocations addSubview:self.viewLocHyderbad];
[UIView transitionFromView:self.viewLocBangalore
toView:self.viewLocHyderbad
duration:0.9
options:UIViewAnimationOptionTransitionFlipFromBottom
completion:^(BOOL finished) {
NSLog(@"Locations View Appeared %@", Location); // getting this Log also, but View is missing
}];
}
}
到目前为止我已经尝试过了,我没有得到解决方案。这里到底发生了什么..?谢谢。