`
yidongkaifa
  • 浏览: 4051649 次
文章分类
社区版块
存档分类
最新评论

IOS中的frame 和 tableView的滑动问题

 
阅读更多

Popover push 时 Frame无法改变解决办法

在popover中的ViewController中实现:

- (void)viewWillAppear:(BOOL)animated
{

CGSize size = CGSizeMake(320, 480); // size of view in popover

self.contentSizeForViewInPopover = size;

[superviewWillAppear:animated];

}

tableview 滑动导致 NSTimer和delegate 回调停止 解决办法

// request回调

NSURLRequest*request=...

NSURLConnection*connection=[[NSURLConnectionalloc]
initWithRequest:request
delegate:self
startImmediately:NO];
[connection scheduleInRunLoop:[NSRunLoopcurrentRunLoop]
forMode:NSRunLoopCommonModes];
[connection start];


//timer 回调

NSTimer *updateTimer = [NSTimer scheduledTimerWithTimeInterval:0.01f target:self selector:@selector(updatePencent) userInfo:nil repeats:YES];

NSRunLoop *main=[NSRunLoop currentRunLoop];
[main addTimer:updateTimer forMode:NSRunLoopCommonModes];




分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics