- 博客(21)
- 资源 (4)
- 收藏
- 关注
原创 文本属性Attributes
1.NSKernAttributeName: @10 调整字距 kerning 字距调整2.NSFontAttributeName : [UIFont systemFontOfSize:_fontSize] 设置字体3.NSForegroundColorAttributeName :[UIColor redColor] 设置文字颜色4.NSParagraphStyleAttribute
2014-05-24 23:39:51 624
原创 UIView属性
1.alpha设置视图的透明度.默认为1. // 完全透明 view.alpha = 0; // 不透明 view.alpha = 1;2.clipsToBounds // 默认是NO,当设置为yes时,超出当前视图的尺寸的内容和子视图不会显示。 view.clipsToBounds = YES;3.hidden// 默认是NO,当设
2014-05-24 23:38:33 739
原创 UITextView
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 developers to come to serve their country."; // 设置它显示
2014-05-24 23:37:45 507
原创 UITableView
UITableView内置了两种样式:UITableViewStylePlain,UITableViewStyleGrouped UITableViewDataSource,UITableViewDelegate>里的方法:tableView处理步骤#pragma mark 1.有多少组- (NSInteger)numberOfSectionsInTableView:(UITa
2014-05-24 23:37:22 635
原创 UITextField属性
0. enablesReturnKeyAutomatically默认为No,如果设置为Yes,文本框中没有输入任何字符的话,右下角的返回按钮是disabled的。1.borderStyle设置边框样式,只有设置了才会显示边框样式 text.borderStyle = UITextBorderStyleRoundedRect; typedef enum { UITe
2014-05-24 23:36:44 757
原创 UISwitch属性
1. onTintColor 处于on时switch 的颜色 switchImage.onTintColor = [UIColor grayColor];2.tintColor 处于off时switch 的颜色 switchImage.tintColor = [UIColor greenColor];3.onImage 设置on 的图标
2014-05-24 23:36:29 549
原创 UISlide属性
1. minimumValue : 当值可以改变时,滑块可以滑动到最小位置的值,默认为0.0_slider.minimumValue = 10.0; 2. maximumValue : 当值可以改变时,滑块可以滑动到最大位置的值,默认为1.0_slider.maximumValue = 100.0; 3. continuous : 如果设置YES,在拖动滑块的任何
2014-05-24 23:35:49 624
原创 UISegment属性
1.segmentedControlStyle设置segment的显示样式。typedef NS_ENUM(NSInteger, UISegmentedControlStyle) {UISegmentedControlStylePlain, // large plain 系统默认平板样式segmentedControl.segmentedControlStyle = UIS
2014-05-24 23:35:14 695
原创 UIScrollView
1. contentOffset默认CGPointZero,用来设置scrollView的滚动偏移量。 // 设置scrollView的滚动偏移量 scrollView.contentOffset = CGPointMake(0, 200);2. contentSize默认CGSizeZero,用来设置scrollView的滚动范围。 // 设置scrol
2014-05-24 23:33:54 568
原创 UIPikerView的属性
1. numberOfComponents:返回UIPickerView当前的列数NSInteger num = _pickerView.numberOfComponents;NSLog( @"%d", num);2. - (NSInteger)numberOfRowsInComponent:(NSInteger)component; 返回component列中有多少行。NSInt
2014-05-24 23:33:15 618
原创 UIPageControl
1. numberOfPages // 设置有多少页 默认为0// 2) 设置页数 [pageControl setNumberOfPages:kImageCount];2. currentPage // 设置当前页[pageControl setCurrentPage:0]; 3. pageIndicatorTintColor // 设置页码指示器颜色 [pag
2014-05-24 23:31:04 506
原创 UILabel属性
UILabel属性1.text:设置标签显示文本。 2.attributedText:设置标签属性文本。 Ios代码 NSString *text = @"first"; NSMutableAttributedString *textLabelStr = [[NSMutableAttributedString alloc] initWithString:text]; [
2014-05-24 23:29:35 515
原创 UIImageView属性
1.Image 设置图片,默认显示 UIImageView *_imageView = [[UIImageView alloc]init]; _imageView.image = [UIImage imageNamed:@"me.png"]; 2.highlightedImage 设置高亮状态下显示的图片_imageView.highlightedImage = [U
2014-05-24 23:26:29 599
原创 UIImagePickerController
1.+(BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType; 检查指定源是否在设备上可用。//检查照片源是否可用[UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceT
2014-05-24 23:25:13 993
原创 UIDatePicker
1. Locale设置DatePicker的地区,即设置DatePicker显示的语言。// 1.跟踪所有可用的地区,取出想要的地区 NSLog(@"%@", [NSLocale availableLocaleIdentifiers]); // 2. 设置日期选择控件的地区[datePicker setLocale:[[NSLocalealloc]initW
2014-05-24 23:23:58 1273
原创 UIControl事件
1.UIControlEventTouchDown单点触摸按下事件:用户点触屏幕,或者又有新手指落下的时候。2.UIControlEventTouchDownRepeat多点触摸按下事件,点触计数大于1:用户按下第二、三、或第四根手指的时候。3.UIControlEventTouchDragInside当一次触摸在控件窗口内拖动时。4.UIControlEventTouch
2014-05-24 23:13:05 1024
原创 UIAlertView
UIAlertView1.Title获取或设置UIAlertView上的标题。 2.Message获取或设置UIAlertView上的消息 UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Title" message:@"message" delegate:self cancelBu
2014-05-24 23:11:31 909
原创 UIActivityIndicatorView
1. activityIndicatorViewStyle设置指示器的样式UIActivityIndicatorViewStyleWhiteLarge UIActivityIndicatorViewStyleWhite (默认样式)UIActivityIndicatorViewStyleGray 2.hidesWhenStopped当停止动画的时候,是否隐藏。默认为Y
2014-05-24 23:02:52 893
原创 UIButton属性
1.UIButton状态:UIControlStateNormal // 正常状态 UIControlStateHighlighted // 高亮状态 UIControlStateDisabled // 禁用状态 UIControlStateSelected // 选中状态 UIControlStateA
2014-05-24 22:49:31 1058
转载 开发中常见问题集锦
这篇文章是专门用来记录开发中一些常见的BUG以及常用的零碎知识点,我会隔一段时间更新内容1.重复调用2次loadView和viewDidLoad最好不要在UIViewController的loadView方法中改变状态栏的可视性(比如状态栏由显示变为隐藏、或者由隐藏变为显示),因为会导致重复调用2次loadView和viewDidLoad方法假设状态栏本来是处于显示状态
2014-05-02 18:45:35 568
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人