Iphone 为什么我的UIScrollView的框架在使用AsiTpRequest进行调用后会发生变化?
我正在试图弄清楚为什么在使用AsittpRequest之后,UIScrollView的框架会发生变化。在nib中,UIScrollView设置为Iphone 为什么我的UIScrollView的框架在使用AsiTpRequest进行调用后会发生变化?,iphone,objective-c,uiscrollview,asihttprequest,Iphone,Objective C,Uiscrollview,Asihttprequest,我正在试图弄清楚为什么在使用AsittpRequest之后,UIScrollView的框架会发生变化。在nib中,UIScrollView设置为{0,0},{320416},视图上的顶部栏将其设置为导航栏 这是我的密码: NSLog(@"Before URL %@", NSStringFromCGRect(mainScrollView.frame)); __unsafe_unretained __block ASIHTTPRequest *request = [ASIHTTPReque
{0,0},{320416}
,视图上的顶部栏将其设置为导航栏
这是我的密码:
NSLog(@"Before URL %@", NSStringFromCGRect(mainScrollView.frame));
__unsafe_unretained __block ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:urlStr]];
[request setDefaultResponseEncoding:NSUTF8StringEncoding];
[request setCompletionBlock:^{
int responseCode = [request responseStatusCode];
if(responseCode == 200) {
NSLog(@"200 %@", NSStringFromCGRect(mainScrollView.frame));
我在控制台中得到的输出是:
在URL{{0,0},{320416}之前
200{{0,-44},{320416}
您是否尝试更改nib文件中的设置
检查nib中滚动视图的自动大小。是否对其superview进行了任何调整?有没有其他方法可以调整任何视图元素的大小?@barfoon:胡猜!与ASIHTTPRequest控制状态栏中的网络活动指示器有关吗?可能值得调查或强行离开。这解决了问题。我仍然想知道为什么会这样。