1
的结构是这样的,..添加一个UIView的到子视图这已经加入的MainView
*)的MainView
1) viewLocations(UIVIEW) // this one is adding fine a) viewBangalore b) viewHyderbad
其实我在做一个iPad应用程序,在UIViewController之一中,我使用UiTableController作为滑动视图来选择位置。根据位置选择,需要显示UiView的。
viewLocations - > CGRectMake(0108588533)
这里我的代码是:
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
}];
}
}
到目前为止,我已经尽力了,我din't得到它的解决方案。这里究竟发生了什么..? 谢谢。
检查视图的背景颜色? – Balu 2013-05-01 12:34:25
@Sunny我也试过,也.. – 2013-05-01 12:42:57
你确定self.viewLocations连接(而不是无)? – 2013-05-01 12:47:05