1. 下层函数定义时使用的 CGFloat,上层传入参数时使用的float(因为底层有多个实例类,必须使用强制转换成id后才能调用底层函数,所以类型检查无法查出传入参数类型与下层定义类型不同),在64位平台下会导致下层函数接收到的数据与传入输入不同。
2. UITextView 如果粘贴大量的文字进去,会发现光标会在滚动之后消失,需要手动滚动一下才会显示出来。解决这一问题的办法是,利用scrollview的delegate,当滚动结束后用代码调整scrollview滚动到最后的位置
- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView
{
// when the user past many words in textview, the cursor will disappear after pasting,
// set the scroll view scroll to bottom after pasting
[self.editPhotoView.imageDesc scrollRectToVisible:CGRectMake(0, self.editPhotoView.imageDesc.contentSize.height-self.editPhotoView.imageDesc.frame.size.height, self.editPhotoView.imageDesc.contentSize.width, self.editPhotoView.imageDesc.frame.size.height) animated:NO];
}