IOS开发UI基础UIPikerView的属性】的更多相关文章

UIPikerView的属性 1. numberOfComponents:返回UIPickerView当前的列数NSInteger num = _pickerView.numberOfComponents;NSLog( @"%d", num); 2. - (NSInteger)numberOfRowsInComponent:(NSInteger)component; 返回component列中有多少行.NSInteger numInCp = [_pickerView numberOfR…
UIImagePickerController 1.+(BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType;                 检查指定源是否在设备上可用.//检查照片源是否可用[UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary] 2.allowsEditi…
UITableView UITableView内置了两种样式:UITableViewStylePlain,UITableViewStyleGrouped <UITableViewDataSource,UITableViewDelegate>里的方法: tableView处理步骤 #pragma mark 1.有多少组- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView #pragma mark 2.第section组…
UITextFidle相关属性 •    enablesReturnKeyAutomatically默认为No,如果设置为Yes,文本框中没有输入任何字符的话,右下角的返回按钮是disabled的. 1.borderStyle 设置边框样式,只有设置了才会显示边框样式   text.borderStyle = UITextBorderStyleRoundedRect; typedef enum {    UITextBorderStyleNone,     UITextBorderStyleLi…
UIDatePicker        •    Locale设置DatePicker的地区,即设置DatePicker显示的语言.// 1.跟踪所有可用的地区,取出想要的地区    NSLog(@"%@", [NSLocale availableLocaleIdentifiers]);    // 2. 设置日期选择控件的地区[datePicker setLocale:[[NSLocalealloc]initWithLocaleIdentifier:@"zh_Hans_CN…
UIPageControl 常见属性: •    numberOfPages // 设置有多少页 默认为0 [pageControl setNumberOfPages:kImageCount]; •    currentPage  // 设置当前页         [pageControl setCurrentPage:0]; •    pageIndicatorTintColor // 设置页码指示器颜色        [pageControl setPageIndicatorTintColo…
UITextView相关属性 •    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."; // 设置它显示的内容    •    font:设置textView中文字…
UIActivityIndicatorView 1.activityIndicatorViewStyle设置指示器的样式UIActivityIndicatorViewStyleWhiteLarge UIActivityIndicatorViewStyleWhite  (默认样式)UIActivityIndicatorViewStyleGray 2.hidesWhenStopped当停止动画的时候,是否隐藏.默认为YES. 3. 实例化指示器对象,根据样式设置尺寸,不需要手动设置.-(id)ini…
UIAlertView1.Title获取或设置UIAlertView上的标题. 2.Message获取或设置UIAlertView上的消息 UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Title" message:@"message" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定&q…
iOS开发UI基础—手写控件,frame,center和bounds属性 一.手写控件 1.手写控件的步骤 (1)使用相应的控件类创建控件对象 (2)设置该控件的各种属性 (3)添加控件到视图中 (4)如果是button等控件,还需考虑控件的单击事件等 (5)注意:View Contollor和view的关系 2.注意点 在OC开发中,Storyboard中的所有操作都可以通过代码实现,程序员一定要熟练掌握代码布局界面的能力! 设置控件监听方法的示例代码如下: [btn addTarget:se…