English 中文(简体)
在收到记忆警告和“模式”观点被驳回后,可信赖的意见似乎部分被延迟(空白)。
原标题:UITableView appears partially clipped (blanked out) after receiving memory warning and "modal" view dismissed

我有一个产品详细筛选,在用户选择表/网产品中展示的产品之一时,会发现幻灯。 我利用“智囊团”来压制观点,而不是使用目前的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.

最佳回答

Check the autosizing on your tableview. Make sure it is resizing correctly after the memory warning.

问题回答

暂无回答




相关问题
How to start to create an application GUI using C#?

HI! I am new to C# and plan to use it for my application GUI. I am trying to make my GUI similar to SPSS:http://www.spss.com/images/08/statistics_screens/ez_rfm-big.jpg Is this easy in C#? Is there ...

Automatic height of edit box

My shoes application has three items stacked on top of each other (with a stack, of course), in order: A banner An edit box Two buttons in a flow What I want to do is have the banner stay at it s ...

Search by using the keyboard in a list/grid - algorithm

I need to implement a custom search in a grid and I would like to find some user interface guidelines that explain the standard way to implement it. I mean this kind of search that is initiated by ...

UI And TcpClient Issue in vb.net

I m having some problems with a small ircbot i m writing. Basically I connect to the server using a tcpclient in a seperate class, which also runs on its own thread. I want to display the server text ...

UI Convention: Shortcut key for application exit? [closed]

Is there a convention for the shortcut keys for application exit? Some applications uses Alt+X some others use Ctrl+ X and Ctrl+Q. Applications like FF and IE doesnot assign a shortcut at all. So is ...

热门标签