//獲得自己的父控件對(duì)象@PRoperty(nonatomic,readonly) UIView *superview;//獲得自己的所有子控件對(duì)象@property(nonatomic,readonly,copy) NSArray *subviews;//控件的ID/標(biāo)識(shí),父控件可以通過tag來(lái)找到對(duì)應(yīng)的子控件@property(nonatomic) NSInteger tag;//控件的形變屬性(可以設(shè)置旋轉(zhuǎn)角度、比例縮放、平移等屬性@property(nonatomic) CGAffineTransform transform;
//控件所在矩形框在父控件中的位置和尺寸(以父控件的左上角為坐標(biāo)原點(diǎn))@property(nonatomic) CGRect frame;//控件所在矩形框的位置和尺寸(以自己左上角為坐標(biāo)原點(diǎn),所以bounds的x/y一般為0)@property(nonatomic) CGRect bounds;//控件中點(diǎn)的位置(以父控件的左上角為坐標(biāo)原點(diǎn))@property(nonatomic) CGPoint center;
//label顯示的文字@property(nonatomic,copy) NSString *text;//文字字體大小@property(nonatomic,retain) UIFont *font;//文字的顏色@property(nonatomic,retain) UIColor *textColor;//文字的排列方式(左對(duì)齊、居中、右對(duì)齊)枚舉值@property(nonatomic)NSTextAlignment textAlignment;// 設(shè)置行數(shù)(行數(shù)==0代表自動(dòng)換行)@property(nonatomic) NSInteger numberOfLines;
// 所要顯示的圖片@property(nonatomic,retain) UIImage *image;// 設(shè)置序列幀動(dòng)畫數(shù)組(按順序播放animationImages數(shù)組中的圖片)@property(nonatomic,copy) NSArray *animationImages;// 序列幀動(dòng)畫的持續(xù)時(shí)間@property(nonatomic) NSTimeInterval animationDuration;// 序列幀動(dòng)畫的執(zhí)行次數(shù)(默認(rèn)是0,代表無(wú)限循環(huán))@property(nonatomic) NSInteger animationRepeatCount;
// 表示UIScrollView所滾動(dòng)的位置@property(nonatomic) CGPoint contentOffset;// 表示UIScrollView的內(nèi)容尺寸(能滾動(dòng)的范圍)@property(nonatomic) CGSize contentSize;// 增加UIScrollView額外的邊緣滾動(dòng)區(qū)域@property(nonatomic)UIEdgeInsets contentInset;// 代理@property(nonatomic,assign) id<UIScrollViewDelegate>delegate;
下圖介紹了UIScrollView的幾個(gè)常見屬性
待續(xù)................................
新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注