基本控件备份
文章平均质量分 62
过雨烟蒙
爱技术,爱运动,爱美食,爱生活,爱家人,爱自己
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
UIActivityIndicatorView
UIActivityIndicatorView1. activityIndicatorViewStyle设置指示器的样式UIActivityIndicatorViewStyleWhiteLarge UIActivityIndicatorViewStyleWhite (默认样式)UIActivityIndicatorViewStyleGray 2.hidesWhenStopped当停止动画原创 2016-03-06 21:39:23 · 302 阅读 · 0 评论 -
UIPageControl
UIPageControl1. numberOfPages// 设置有多少页 默认为0// 设置页数 [pageControl setNumberOfPages:kImageCount];2. currentPage// 设置当前页 [pageControl setCurrentPage:0];3. pageIndicatorTintColor// 设置页码指示器颜色 [pageContr原创 2016-03-07 00:44:09 · 263 阅读 · 0 评论 -
UIPikerView的属性
UIPikerView的属性一、属性1. numberOfComponents:返回UIPickerView当前的列数NSInteger num = _pickerView.numberOfComponents; NSLog( @"%d", num);2. - (NSInteger)numberOfRowsInComponent:(NSInteger)component;返回component列中有原创 2016-03-07 01:03:05 · 300 阅读 · 0 评论 -
UIScrollView
UIScrollView1. contentOffset默认CGPointZero,用来设置scrollView的滚动偏移量。 // 设置scrollView的滚动偏移量 scrollView.contentOffset = CGPointMake(0, 200);2. contentSize默认CGSizeZero,用来设置scrollView的滚动范围。 // 设置scrollVi原创 2016-03-07 01:10:50 · 329 阅读 · 0 评论 -
UIView
UIView属性1.alpha设置视图的透明度.默认为1. // 完全透明 view.alpha = 0; // 不透明 view.alpha = 1;2.clipsToBounds// 默认是NO,当设置为yes时,超出当前视图的尺寸的内容和子视图不会显示。 view.clipsToBounds = YES;3.hidden// 默认是NO,当设置为ye原创 2016-03-08 16:32:30 · 248 阅读 · 0 评论 -
UISwitch
UISwitch属性1. onTintColor处于on时switch 的颜色 switchImage.onTintColor = [UIColor grayColor];2.tintColor处于off时switch 的颜色 switchImage.tintColor = [UIColor greenColor];3.onImage设置on 的图标 switchImage.onImage原创 2016-03-08 16:36:17 · 338 阅读 · 0 评论 -
UISegment
UISegment属性 1.segmentedControlStyle 设置segment的显示样式。typedef NS_ENUM(NSInteger, UISegmentedControlStyle) { UISegmentedControlStylePlain, // large plain 系统默认平板样式 UISegmentedControlStyleBordered, //原创 2016-03-08 16:57:07 · 490 阅读 · 0 评论 -
UISlide
UISlide属性1. minimumValue :当值可以改变时,滑块可以滑动到最小位置的值,默认为0.0_slider.minimumValue = 10.0;2. maximumValue :当值可以改变时,滑块可以滑动到最大位置的值,默认为1.0_slider.maximumValue = 100.0;3. continuous :如果设置YES,在拖动滑块的任何时候,滑块的值都会改变。默认原创 2016-03-08 17:07:51 · 1091 阅读 · 0 评论 -
UITextField
UITextField属性0. enablesReturnKeyAutomatically默认为No,如果设置为Yes,文本框中没有输入任何字符的话,右下角的返回按钮是disabled的。1.borderStyle设置边框样式,只有设置了才会显示边框样式 text.borderStyle = UITextBorderStyleRoundedRect; typedef enum { UIT原创 2016-03-09 09:31:38 · 855 阅读 · 0 评论 -
UITextView
UITextView1. 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 developers to come to serve their country."; /原创 2016-03-09 09:47:41 · 490 阅读 · 0 评论 -
UILabel属性
UILabel属性1.text:设置标签显示文本。 2.attributedText:设置标签属性文本。 Ios代码 NSString *text = @"first"; NSMutableAttributedString *textLabelStr = [[NSMutableAttributedString alloc] initWithString:text]; [textLabel原创 2016-03-07 00:40:42 · 305 阅读 · 0 评论 -
UIImageView属性
UIImageView属性1.Image 设置图片,默认显示UIImageView *_imageView = [[UIImageView alloc]init]; _imageView.image = [UIImage imageNamed:@"me.png"];2.highlightedImage 设置高亮状态下显示的图片_imageView.highlightedImage = [UIImag原创 2016-03-07 00:31:58 · 315 阅读 · 0 评论 -
UIButton
UIButton属性1.UIButton状态:UIControlStateNormal // 正常状态 UIControlStateHighlighted // 高亮状态 UIControlStateDisabled // 禁用状态 UIControlStateSelected // 选中状态 UIControlSta原创 2016-03-06 21:17:22 · 265 阅读 · 0 评论 -
NSAttributedString
NSAttributedString1.使用这个类,必须先导入CoreText框架。 2.给UILabel设置attributedText了会导致给UILabel中text,font,textColor,shadowColor,shadowOffset,textAlignment,lineBreakMode这7个属性设置值时无效果。 3.这个框架的应用场景一般在图文混排和搜索功能中应用比较多。4原创 2016-03-06 21:44:36 · 257 阅读 · 0 评论 -
文本属性Attributes
文本属性Attributes 1.NSKernAttributeName: @10 调整字句 kerning 字句调整2.NSFontAttributeName : [UIFont systemFontOfSize:_fontSize] 设置字体3.NSForegroundColorAttributeName :[UIColor redColor] 设置文字颜色4.NSParagraphStyle原创 2016-03-06 21:58:02 · 369 阅读 · 0 评论 -
NSTextView和Attribued String
1.NSTextView和Attribued String第一次接触苹果系的富文本编程是在写Mac平台上的一个输入框的时候,输入框中的文字可以设置各种样式,并可以在文字中间插入图片,好在Mac的AppKit中提供了NSTextView这个支持富文本编辑器控件。此控件背后是通过什么方式来描述富文本的呢?答案是NSAttributedString,很多编程语言都提供了AttributedString的概原创 2016-03-06 23:40:04 · 2033 阅读 · 0 评论 -
UIAlertView
UIAlertView1.Title获取或设置UIAlertView上的标题。2.Message获取或设置UIAlertView上的消息 UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Title" message:@"message" delegate:self cancelButtonTitle:@"取消" oth原创 2016-03-06 23:56:38 · 219 阅读 · 0 评论 -
UIControl事件
UIControl事件1.UIControlEventTouchDown单点触摸按下事件:用户点触屏幕,或者又有新手指落下的时候。2.UIControlEventTouchDownRepeat多点触摸按下事件,点触计数大于1:用户按下第二、三、或第四根手指的时候。3.UIControlEventTouchDragInside当一次触摸在控件窗口内拖动时。4.UIControlEventTouchDr原创 2016-03-07 00:00:14 · 218 阅读 · 0 评论 -
UIDatePicker
UIDatePicker 1.Locale设置DatePicker的地区,即设置DatePicker显示的语言。 // 1.跟踪所有可用的地区,取出想要的地区 NSLog(@”%@”, [NSLocale availableLocaleIdentifiers]);// 2. 设置日期选择控件的地区 [datePicker setLocale:[[NSLocale alloc]in原创 2016-03-07 00:08:47 · 311 阅读 · 0 评论 -
UIKit结构图
UIKit结构图原创 2016-03-07 00:16:44 · 283 阅读 · 0 评论 -
UIImagePickerController
UIImagePickerController1.+(BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType;//检查照片源是否可用 [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibr原创 2016-03-07 00:26:34 · 811 阅读 · 0 评论 -
CoreText
core text 架构 CTFrame 作为一个整体的画布(Canvas),其中由行(CTLine)组成,而每行可以分为一个或多个小方块(CTRun)。注意:你不需要自己创建CTRun,Core Text将根据NSAttributedString的属性来自动创建CTRun。每个CTRun对象对应不同的属性,正因此,你可以自由的控制字体、颜色、字间距等等信息。通常处理步聚:1.使用core tex原创 2016-04-06 14:25:45 · 428 阅读 · 0 评论
分享