-(void)showKeyboard:(NSNotification *)notification{
UIEdgeInsets contentInsets = UIEdgeInsetsMake(0,0,100,0);
self.scroll.contentSize = CGSizeMake(200, 400);
self.scroll.contentInset = contentInsets;这段代码是点击textfield 后scrollView上弹,在ios7上运行正常
但ios6上遇到个惨绝人寰的问题,点击textfield后运行代码没反应,但点击键盘上随便一个字母时却正常上弹了。
怎么回事,这时候明明没代码运行。上面那段代码明明是 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showKeyboard:) name:UIKeyboardDidShowNotification object:nil];运行了。
UIEdgeInsets contentInsets = UIEdgeInsetsMake(0,0,100,0);
self.scroll.contentSize = CGSizeMake(200, 400);
self.scroll.contentInset = contentInsets;这段代码是点击textfield 后scrollView上弹,在ios7上运行正常
但ios6上遇到个惨绝人寰的问题,点击textfield后运行代码没反应,但点击键盘上随便一个字母时却正常上弹了。
怎么回事,这时候明明没代码运行。上面那段代码明明是 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showKeyboard:) name:UIKeyboardDidShowNotification object:nil];运行了。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货