关键字 yiem 的文章


由   YIem   撰写于    浏览:3448  评论:0
// 辅助视图// cell.accessoryType = UITableViewCellAccessoryDetailButton;// 感叹号 // cell.accessoryType = UITableViewCellAccessoryCheckmark;// 对号 // cell.accessoryType = UITableV[...]

由   YIem   撰写于    浏览:2876  评论:0
// tableView结构 // tableHeaderView + tableView + tableFooterView // tableView -> section + row // section -> header + row + footer

由   YIem   撰写于    浏览:2926  评论:0
// tableView的头部脚部区域 // 头 (只有高度起作用) UIView *header = [[UIView alloc]initWithFrame:CGRectMake(100, 100, 100, 100)]; header.backgroundColor = [UIColor redColor]; tableView.tableH[...]

由   YIem   撰写于    浏览:3540  评论:0
// 设置 // indePath 定位信息 包含section和row cell.textLabel.text = [NSString stringWithFormat:@"s: %ld, r: %ld", indexPath.section, indexPath.row];

由   YIem   撰写于    浏览:2622  评论:0
// tableView点击方法(void)tableView:(UITableView )tableView didSelectRowAtIndexPath:(NSIndexPath )indexPath{NSLog(@"点击"); // 取消选中效果 [tableView deselectRowAtIndexPath:ind[...]

由   YIem   撰写于    浏览:3554  评论:0
// tableView右部索引栏(NSArray )sectionIndexTitlesForTableView:(UITableView )tableView{return @[@"a", @"1", @"啦"];}

由   YIem   撰写于    浏览:3239  评论:0
// 高度控制// 行高(CGFloat)tableView:(UITableView )tableView heightForRowAtIndexPath:(NSIndexPath )indexPath{return 100;}// 头部高度(CGFloat)tableView:(UITableView *)tableView heightFor[...]

由   YIem   撰写于    浏览:2959  评论:0
// 自定义头部区域(UIView )tableView:(UITableView )tableView viewForHeaderInSection:(NSInteger)section{UIView *header = [[UIView alloc]initWithFrame:CGRectMake(100, 100, 100, 100)];he[...]

由   YIem   撰写于    浏览:2967  评论:0
// 分区头名称(NSString )tableView:(UITableView )tableView titleForHeaderInSection:(NSInteger)section{return @"头头头";}// 分区脚部名称(NSString )tableView:(UITableView )tableView titleForFo[...]

由   YIem   撰写于    浏览:3246  评论:0
// 分割线样式tableV.separatorStyle = UITableViewCellSeparatorStyleSingleLine; // 分割线颜色 tableV.separatorColor = [UIColor greenColor]; // 行高 - 如果使用协议方法设置行高, 此句无效 tableV.rowHeight = 200;

由   YIem   撰写于    浏览:3265  评论:0
第⼀步:声明协议第⼆步:声明代理⼈第三步:执⾏协议方法第四步:签订协议第五步:指定代理⼈第六步:实现协议方法

由   YIem   撰写于    浏览:3178  评论:0
// 背景图片 [navigation.navigationBar setBackgroundImage:[UIImage imageNamed:@"10425.jpg"] forBarMetrics:UIBarMetricsDefault]; ![ // 背景图片[navigation.navigationBar set[...]

由   YIem   撰写于    浏览:2636  评论:0
// 前景色 navigation.navigationBar.barTintColor = [UIColor cyanColor]; // 背景色// navigation.navigationBar.backgroundColor = [UIColor cyanColor];// 边框色 navigation.navigation[...]

由   YIem   撰写于    浏览:3942  评论:0
/********UIPageControl 页码********/ UIPageControl *pcr = [[UIPageControl alloc] initWithFrame:CGRectMake(100, 500, 200, 50)]; // 注意属性 // 注意, 如果不设置页码个数 控件不显示 pcr.numberOfPages[...]

由   YIem   撰写于    浏览:4530  评论:0
UISlide 滑动条UISlider *slide = [[UISlider alloc] initWithFrame:CGRectMake(100, 400, 300, 10)];// 重要属性 // 最小值 slide.minimumValue = 0; // 最大值 slide.maximumValue = 10; // 设置进度位置 sl[...]

由   YIem   撰写于    浏览:3229  评论:0
/****** UISwith 开关******/ // frame只有坐标生效, 大小无效由系统默认指定 UISwitch *swt = [[UISwitch alloc] initWithFrame:CGRectMake(100, 200, 0, 0)]; // 注意触发方式 [swt addTarget:self action:@sele[...]

由   YIem   撰写于    浏览:3297  评论:0
iOS-UI-创建3个UISlider-分别设置划过区域的颜⾊分别为红,黄,蓝-通过控制三个slider改变self.view的背景颜⾊#import "ViewController.h"@interface ViewController ()@property (nonatomic, retain) UISlider *red;@property[...]

由   YIem   撰写于    浏览:3198  评论:0
#import "ViewController.h" @interface ViewController ()@property (nonatomic, retain) UILabel *label;@end@implementation ViewController(void)dealloc{[_label release];[...]

由   YIem   撰写于    浏览:3768  评论:0
/******* 假夜间模式 *********/ // 开关 UISwitch *sw = [[UISwitch alloc] initWithFrame:CGRectMake(100, 200, 100, 100)]; [sw addTarget:self action:@selector(swAction:) forControlEvents[...]

由   YIem   撰写于    浏览:4491  评论:0
SetViewController *setVC = [[SetViewController alloc]init];// 注意坐标设置 setVC.view.frame = CGRectMake(-150, 0, 150, self.view.frame.size.height); [self addChildViewControll[...]

由   YIem   撰写于    浏览:3972  评论:0
self.seg = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObjects:@"界面1", @"界面2", @"界面3", nil]];self.seg.frame = CGRectMake(100, 100, 200, 30); // 起始选中状态 self.seg[...]

由   YIem   撰写于    浏览:5469  评论:0
// 提示框 // 提示框的样式只有两种 中间 下方 UIAlertController *alertC = [UIAlertController alertControllerWithTitle:@"注意" message:@"你是傻逼" preferredStyle:UIAlertControllerS[...]

由   YIem   撰写于    浏览:3567  评论:0
// 容器视图控制器 self.secondVC = [[SecondViewController alloc] init]; // 将VC添加的原因 // 1. 事件沿VC传递 // 2. 防止VC释放而所属View未释放 [self addChildViewController:self.secondVC]; [self.view addS[...]

由   YIem   撰写于    浏览:3516  评论:0
NSUserDefaults 是全局变量 简单信息存储数据到本地// 用来向本地存储一些简单信息 NSUserDefaults *userD = [NSUserDefaults standardUserDefaults]; // 存入BOOL类型数据 [userD setBool:YES forKey:@"isLogin"];[...]

由   YIem   撰写于    浏览:3003  评论:0
iOS-UI-Button按钮自定义图标-图片样式切换 UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];button.frame = CGRectMake(100, 300, 200, 50); // 正常状态 [button setBackgroundImage[...]