UIScrollView 的特殊之处就在于当它遇到了AutoLayout之后其contentSize 的计算规则有些特殊。contentSize是根据子视图的leading/trailing/top/bottom进行确定的 所以避免我们手动去设置 contentSize,我们必须迎合它的规则去设置 let scrollView = UIScrollView()
问题1:ec-canvas出现上下滑动页面会漂移 解决方法:在标签内加 force-use-old-canvas="true" 问题2:echarts的tooltip会超出边界 解决方法: // 1、封装的函数方法 export const setTooltipPosition = function (point, params, dom, rect, size) { // console.log(para
写了一个extension,如下: extension UIScrollView{ ///在ScrollView上的某个点放大 func zoomWithPoint(var zoomPoint:CGPoint,toScale:CGFloat,animated:Bool){ var contentSize:CGSize = CGSize.zeroSize contentSize.width = self.contentSize.width /
引言 问题背景: Self-Sizing在iOS11下是默认开启的,Headers, footers, and cells都默认开启Self-Sizing,所有estimated 高度默认值从iOS11之前的 0 改变为UITableViewAutomaticDimension。 estimatedRowHeight这个属性是给tableView每行设置预估行高,开启Self-Sizing之后,tableVie
原因 UITableView 的 Self-Sizing。及自动计算属性 在iOS11之前Self-Sizing默认是关闭的而在之后默认使用Self-Sizing. 为了性能,使用estimated而不是准确的的值来确定contentsize。因此在estimatedRowHeight, estimatedSectionHeaderHeight,estimatedSectionFooterHeight由0变
抛出异常的原因是http协议默认的并发访问量是2,但是当长时间访问网络不好,或者数据量较大的路径时候就会很快消耗完访问次数,所以解决办法如下(另外附上一个简单的下载方法,网上多的是):、 System.Net.ServicePointManager.DefaultConnectionLimit = 999;(999这个数字是随便写的,一般情况