我有一个产品详细筛选,在用户选择表/网产品中展示的产品之一时,会发现幻灯。 我利用“智囊团”来压制观点,而不是使用目前的ModalViewController。
其原因是,在细节筛选中,我允许用户离开/有权通过产品表浏览,并显示相应的细节。 同样,滑坡的消化也是利用“过渡”。 当我使用一种模式来介绍初步细节筛选时,冲积式产品筛选似乎会轮值,通常情况不好。 我假定,在模式框架内使用加权转让有一定的意义,因此,我决定利用“过渡”来提供初步筛选。 这里是滑坡成像的法典:
+(void)slideFromView:(UIView*)currentView toView:(UIView*)nextView direction(CCUISlideDirection)direction{
// get the the underlying UIWindow, or the view containing the current view
UIView *theWindow = [currentView superview];
// remove the current view and replace with the next view to display
[currentView removeFromSuperview];
[theWindow addSubview:nextView];
// set up an animation for the transition between the views
CATransition *animation = [CATransition animation];
[animation setDuration:0.5];
[animation setType:kCATransitionPush];
switch (direction) {
case CCUISlideLeft:
[animation setSubtype:kCATransitionFromRight];
break;
case CCUISlideRight:
[animation setSubtype:kCATransitionFromLeft];
break;
case CCUISlideUp:
[animation setSubtype:kCATransitionFromTop];
break;
case CCUISlideDown:
[animation setSubtype:kCATransitionFromBottom];
break;
default:
break;
}
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
[[theWindow layer] addAnimation:animation forKey:@"SwitchToView1"];
}
Now all the swiped-in view transitions work fine, until I receive a memory warning. After I receive the warning, and then dismiss/slide the details screen offscreen, part of the table/grid view of products appears clipped. Specifically, about 1/3 of the right side of the table appears white. See screenshot link below:
这里还有代表法驳回以下观点:
-(IBAction)dismiss:(id)sender
{
MyWishesItemController* controller = (MyWishesItemController*)sender;
[CCUIHelper slideFromView:controller.currentView toView:self.view direction:CCUISlideDown];
if ([[_wishListResultsController fetchedObjects] count] > 0) {
[self showWishList];
}
else {
[self showEmptyList];
}
}
而且,当我选择不同表格的观点并回到表层时,看来是罚款。 我的奇怪之处是,这只是一张空表的一部分。 我在接到警告时试图重载桌子,但那是徒劳的。 我也通过一些手段来确定和确定某些泄漏。
Other than clearing some caches in the didReceiveMemoryWarning method, and otherwise minimizing memory usage to avoid the warnings, what should I be doing to fix this problem. Any suggestions would be greatly appreciated.