原文链接:https://gist.github.com/lattner/31ed37682ef1576b16bca1432ea9f782
作者: Chris Lattner
constructor(props) { | |
super(props); | |
this.state = { | |
height: window.innerHeight, | |
message: 'not at bottom' | |
}; | |
this.handleScroll = this.handleScroll.bind(this); | |
} | |
handleScroll() { | |
const windowHeight = "innerHeight" in window ? window.innerHeight : document.documentElement.offsetHeight; |
#import <Foundation/Foundation.h> | |
#include <objc/objc-api.h> | |
#include <objc/runtime.h> | |
#include <malloc/malloc.h> | |
#include <mach/mach.h> | |
@interface TEST : NSObject | |
@end | |
@implementation TEST |
http://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/UIScrollView_pg/CreatingBasicScrollViews/CreatingBasicScrollViews.html | |
contentSize是scrollview可以滚动的区域,比如frame = (0 ,0 ,320 ,480) contentSize = (320 ,960), | |
代表你的scrollview可以上下滚动,滚动区域为frame大小的两倍。 | |
contentOffset是scrollview当前显示区域顶点相对于frame顶点的偏移量,比如上个例子你拉到最下面, | |
contentoffset就是(0 ,480),也就是y偏移了480 | |
//与margin类似 | |
contentInset是scrollview的contentview的顶点相对于scrollview的位置,例如你的contentInset = (0 ,100),那么你的contentview就是从scrollview的(0 ,100)开始显示 |
mr Marathi | |
bs Bosnian | |
ee_TG Ewe (Togo) | |
ms Malay | |
kam_KE Kamba (Kenya) | |
mt Maltese | |
ha Hausa | |
es_HN Spanish (Honduras) | |
ml_IN Malayalam (India) | |
ro_MD Romanian (Moldova) |