UIButton属性 1.UIButton状态: UIControlStateNormal          // 正常状态    UIControlStateHighlighted     // 高亮状态    UIControlStateDisabled        // 禁用状态     UIControlStateSelected        // 选中状态     UIControlStateApplication     //      UIControlStateReserve…
1.+(BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType;         // 检查指定源是否在设备上可用. [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary];  //检查照片源是否可用 2.allowsEditing 默认NO 是否允许编辑 [imagePick…
UITableView UITableView内置了两种样式:UITableViewStylePlain,UITableViewStyleGrouped   <UITableViewDataSource,UITableViewDelegate>里的方法: tableView处理步骤 1.有多少组 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 2.第section组头部控件有多高 - (CGFloat)tabl…
UIView 1.alpha 设置视图的透明度.默认为1. // 完全透明 view.alpha = 0; // 不透明 view.alpha = 1; 2.clipsToBounds // 默认是NO,当设置为yes时,超出当前视图的尺寸的内容和子视图不会显示. view.clipsToBounds = YES; 3.hidden // 默认是NO,当设置为yes,视图就看不见了. view.hidden = YES; 4.userInteractionEnabled // 默认为YES,如果…
UITextField属性 0.     enablesReturnKeyAutomatically 默认为No,如果设置为Yes,文本框中没有输入任何字符的话,右下角的返回按钮是disabled的. 1.borderStyle 设置边框样式,只有设置了才会显示边框样式 text.borderStyle = UITextBorderStyleRoundedRect; typedef enum { UITextBorderStyleNone, UITextBorderStyleLine, UITe…
UILabel属性 1.text:设置标签显示文本. label.text = @"我是Label"; 2.attributedText:设置标签属性文本. NSString *text = @"first"; NSMutableAttributedString *textLabelStr = [[NSMutableAttributedString alloc] initWithString:text]; [textLabelStr setAttributes:@{…
1.   numberOfComponents:返回UIPickerView当前的列数 NSInteger num = _pickerView.numberOfComponents; NSLog( @"%d", num); 2. - (NSInteger)numberOfRowsInComponent:(NSInteger)component; 返回component列中有多少行. NSInteger numInCp = [_pickerView numberOfRowsInCompo…
UIScrollView 1.   contentOffset 默认CGPointZero,用来设置scrollView的滚动偏移量. // 设置scrollView的滚动偏移量 scrollView.contentOffset = CGPointMake(0, 200); 2.   contentSize 默认CGSizeZero,用来设置scrollView的滚动范围. // 设置scrollView的滚动范围 scrollView.contentSize = CGSizeMake( sel…
UIPageControl 1.   numberOfPages // 设置有多少页 默认为0 [pageControl setNumberOfPages:kImageCount]; 2.   currentPage  // 设置当前页 [pageControl setCurrentPage:0]; 3.   pageIndicatorTintColor // 设置页码指示器颜色 [pageControl setPageIndicatorTintColor:[UIColor blackColor…
UISegment属性 1.segmentedControlStyle 设置segment的显示样式. typedef NS_ENUM(NSInteger, UISegmentedControlStyle) { UISegmentedControlStylePlain,     // large plain 系统默认平板样式 segmentedControl.segmentedControlStyle = UISegmentedControlStylePlain; UISegmentedCont…