摘要: 创建文本输入框 UITextField * textField = [[UITextField alloc]initWithFrame:CGRectMake(50, 50, 250, 40)];设置边框样式 textField.borderStyle = UITextBorderStyl... 阅读全文
posted @ 2015-11-24 01:20 GXcoder 阅读(224) 评论(4) 推荐(0) 编辑
摘要: 创建UITextView//创建一个单例对象 存储_str字符串 NSUserDefaults * hd = [NSUserDefaults standardUserDefaults]; _str = [hd objectForKey:@"str"]; UIText... 阅读全文
posted @ 2015-11-24 01:13 GXcoder 阅读(206) 评论(0) 推荐(0) 编辑
摘要: UIStepper * stepper = [[UIStepper alloc]initWithFrame:CGRectMake(50, 100, 150, 40)]; //********最小值和最大值 stepper.maximumValue = 100; ste... 阅读全文
posted @ 2015-11-24 01:09 GXcoder 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 创建分段选择器 UISegmentedControl * sc = [[UISegmentedControl alloc]initWithFrame:CGRectMake(50, 100, 200, 30)]; [sc insertSegmentWithTitle:@"第一页" ... 阅读全文
posted @ 2015-11-24 01:06 GXcoder 阅读(885) 评论(0) 推荐(0) 编辑
摘要: 创建ProgressView UIProgressView * progressView = [[UIProgressView alloc]initWithFrame:CGRectMake(50, 100, 200, 10)]; progressView.progressView... 阅读全文
posted @ 2015-11-24 01:02 GXcoder 阅读(761) 评论(0) 推荐(0) 编辑
摘要: 创建提示框 //创建提示框 //标题 提示内容 代理对象 按钮 UIAlertView * alertView = [[UIAlertView alloc]initWithTitle:@"警告" message:@"萨达姆已经做好战斗准备" delegate:self ca... 阅读全文
posted @ 2015-11-24 00:58 GXcoder 阅读(491) 评论(0) 推荐(0) 编辑
摘要: 创建UIActivityIndicatorView UIActivityIndicatorView * AIV = [[UIActivityIndicatorView alloc]initWithFrame:CGRectMake(50, 50, 50, 50)]; //设置样式 ... 阅读全文
posted @ 2015-11-24 00:52 GXcoder 阅读(418) 评论(0) 推荐(0) 编辑
摘要: UIActionSheet在iOS8.3之后已不建议使用。 可以使用UIAlertController+UIAlertControllerStyleActionSheet获得同样的效果创建UIActionSheet UIActionSheet * as = [[UIActionSheet al... 阅读全文
posted @ 2015-11-24 00:47 GXcoder 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 把NavigationController设为根视图控制器 FirstViewController * firstVC = [[FirstViewController alloc]init]; UINavigationController * nc = [[UINavig... 阅读全文
posted @ 2015-11-24 00:36 GXcoder 阅读(164) 评论(0) 推荐(0) 编辑