您的位置:首页 > 移动开发 > IOS开发

IOS中的frame 和 tableView的滑动问题

2013-07-18 11:17 656 查看
Popover
push 时 Frame无法改变解决办法

在popover中的ViewController中实现:

- (void)viewWillAppear:(BOOL)animated

{

CGSize size = CGSizeMake(320, 480); // size of view in popover
self.contentSizeForViewInPopover = size;
[super viewWillAppear:animated];
}
tableview
滑动导致 NSTimer和delegate 回调停止 解决办法
// request回调

NSURLRequest *request = ...
NSURLConnection *connection = [[NSURLConnection alloc]

initWithRequest:request

delegate:self

startImmediately:NO];

[connection scheduleInRunLoop:[NSRunLoop currentRunLoop]

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];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: