代码改变世界

UIView属性

2016-12-21 11:06 by supper_Ho, 67 阅读, 0 推荐, 收藏, 编辑
摘要:1.alpha 设置视图的透明度.默认为1. // 完全透明 view.alpha = 0; // 不透明 view.alpha = 1; 2.clipsToBounds // 默认是NO,当设置为yes时,超出当前视图的尺寸的内容和子视图不会显示。 view.clipsToBounds = YES 阅读全文

UITextField属性

2016-12-21 11:04 by supper_Ho, 90 阅读, 0 推荐, 收藏, 编辑
摘要:0. enablesReturnKeyAutomatically 默认为No,如果设置为Yes,文本框中没有输入任何字符的话,右下角的返回按钮是disabled的。 1.borderStyle 设置边框样式,只有设置了才会显示边框样式 text.borderStyle = UITextBorderS 阅读全文

UISwitch属性

2016-12-21 11:03 by supper_Ho, 165 阅读, 0 推荐, 收藏, 编辑
摘要:1.onTintColor 处于on时switch 的颜色 switchImage.onTintColor = [UIColor grayColor]; 2.tintColor 处于off时switch 的颜色 switchImage.tintColor = [UIColor greenColor] 阅读全文

UISlide属性

2016-12-21 11:02 by supper_Ho, 117 阅读, 0 推荐, 收藏, 编辑
摘要:1. minimumValue :当值可以改变时,滑块可以滑动到最小位置的值,默认为0.0 _slider.minimumValue = 10.0; 2. maximumValue :当值可以改变时,滑块可以滑动到最大位置的值,默认为1.0 _slider.maximumValue = 100.0; 阅读全文

UISegment属性

2016-12-21 11:01 by supper_Ho, 137 阅读, 0 推荐, 收藏, 编辑
摘要:1.segmentedControlStyle 设置segment的显示样式。 typedefNS_ENUM(NSInteger, UISegmentedControlStyle) { UISegmentedControlStylePlain, // large plain系统默认平板样式 segm 阅读全文

UIScrollView

2016-12-21 10:59 by supper_Ho, 80 阅读, 0 推荐, 收藏, 编辑
摘要:1. contentOffset 默认CGPointZero,用来设置scrollView的滚动偏移量。 // 设置scrollView的滚动偏移量 scrollView.contentOffset = CGPointMake(0, 200); 2. contentSize 默认CGSizeZero 阅读全文

UIPikerView的属性

2016-12-21 10:58 by supper_Ho, 93 阅读, 0 推荐, 收藏, 编辑
摘要:1. numberOfComponents:返回UIPickerView当前的列数 NSInteger num = _pickerView.numberOfComponents; NSLog( @"%d", num); 2.- (NSInteger)numberOfRowsInComponent:( 阅读全文

UIPageControl

2016-12-21 10:57 by supper_Ho, 206 阅读, 0 推荐, 收藏, 编辑
摘要:UIPageControl 1. numberOfPages // 设置有多少页默认为0 // 2) 设置页数 [pageControl setNumberOfPages:kImageCount]; 2. currentPage // 设置当前页 [pageControl setCurrentPag 阅读全文

UILabel属性

2016-12-21 10:56 by supper_Ho, 116 阅读, 0 推荐, 收藏, 编辑
摘要:1.text:设置标签显示文本。 2.attributedText:设置标签属性文本。 Ios代码 NSString *text = @"first"; NSMutableAttributedString *textLabelStr = [[NSMutableAttributedString all 阅读全文

UIKit结构图

2016-12-21 10:55 by supper_Ho, 96 阅读, 0 推荐, 收藏, 编辑
摘要: 阅读全文