代码改变世界

UITextView

2016-12-21 11:06 by supper_Ho, 103 阅读, 0 推荐, 收藏,
摘要:1. text: 设置textView中文本 _textView.text = @"Now is the time for all good developers to come to serve their country.\n\nNow is the time for all good deve 阅读全文

UITextField属性

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

UISwitch属性

2016-12-21 11:03 by supper_Ho, 172 阅读, 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, 133 阅读, 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, 148 阅读, 0 推荐, 收藏,
摘要:1.segmentedControlStyle 设置segment的显示样式。 typedefNS_ENUM(NSInteger, UISegmentedControlStyle) { UISegmentedControlStylePlain, // large plain系统默认平板样式 segm 阅读全文

UIScrollView

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

UIPikerView的属性

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

UIPageControl

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

UILabel属性

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

UIKit结构图

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