2016年2月18日

UI中ViewController的页面跳转和弹出模态

摘要: ViewController 页面跳转 从一个Controller跳转到另一个Controller时,一般有以下2种: 1、利用UINavigationController,调用pushViewController,进行跳转;这种采用压栈和出栈的方式,进行Controller的管理。调用popVie 阅读全文

posted @ 2016-02-18 17:08 Mr_Deng 阅读(1043) 评论(0) 推荐(0) 编辑

UI中TextField控件详解

摘要: 感谢原作者!原文地址:http://blog.csdn.net/lbuskeep/article/details/28543183 //初始化textfield并设置位置及大小 UITextField *text = [[UITextField alloc]initWithFrame:CGRectM 阅读全文

posted @ 2016-02-18 14:38 Mr_Deng 阅读(696) 评论(0) 推荐(0) 编辑

2016年2月17日

UI中Image图片缩放到自定义大小的方法

摘要: //图片缩放的方法 -(UIImage*) OriginImage:(UIImage *)image scaleToSize:(CGSize)size { // 创建一个bitmap的context // 并把它设置成为当前正在使用的context UIGraphicsBeginImageConte 阅读全文

posted @ 2016-02-17 17:51 Mr_Deng 阅读(507) 评论(0) 推荐(0) 编辑

2016年2月16日

OC中@Selector传参总结

摘要: 一、一般情况,使用 self performSelector:SEL withObject:id方法 [self performSelectorOnMainThread:@selector(testAA:) withObject:[NSArray arrayWithObjects:@"1",@"2" 阅读全文

posted @ 2016-02-16 20:26 Mr_Deng 阅读(2094) 评论(0) 推荐(0) 编辑

UI中UIControlEvent通知事件详解

摘要: UIControl类提供了一个标准机制,来进行事件登记和接收。这令你可以指定你的控件在发生特定事件时,通知代理类的一个方法。如果要注册一个事件,可以使用addTarget方法: [ myControl addTarget: myDelegate action:@selector(myActionme 阅读全文

posted @ 2016-02-16 11:27 Mr_Deng 阅读(1613) 评论(0) 推荐(0) 编辑

UI中Button的用法

摘要: 第一、UIButton的定义 UIButton *button=[[UIButton buttonWithType:(UIButtonType); 能够定义的button类型有以下6种, typedef enum { UIButtonTypeCustom = 0, 自定义风格 UIButtonTyp 阅读全文

posted @ 2016-02-16 11:08 Mr_Deng 阅读(446) 评论(0) 推荐(0) 编辑

UI中Slider的用法

摘要: UIslider滑块控件在IOS开发中会常用到,可用于调节音量,字体大小等UI方面的交互,用法总结如下: 初始化一个滑块: UISlider * slider = [[UISlider alloc]initWithFrame:CGRectMake(0, 0, 100, 100)]; 设置滑块位置 @ 阅读全文

posted @ 2016-02-16 09:42 Mr_Deng 阅读(291) 评论(0) 推荐(0) 编辑

2016年2月15日

UI 中程序的生命周期事件(AppDelegate)

摘要: #import "AppDelegate.h" @interface AppDelegate () @end @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunching 阅读全文

posted @ 2016-02-15 17:01 Mr_Deng 阅读(210) 评论(0) 推荐(0) 编辑

UI 中 Label控件的基本用法

摘要: UILabel * label_ = [UILabel new]; //设置LABEL控件的位置和大小 label_.frame = CGRectMake(50, 50, 200, 50); //设置文本文字 label_.text = @"this is a label.this is a lab 阅读全文

posted @ 2016-02-15 16:57 Mr_Deng 阅读(404) 评论(0) 推荐(0) 编辑

iOS开发UI中Timer的用法

摘要: ViewController.m 文件 - (void)viewDidLoad { [super viewDidLoad]; //创建一个定时器 //定时器 创建就运行 //第一个参数 定时器执行时间间隔 单位为秒 //第二个参数 接受事件的对象 //第三个参数 定时器执行的方法 //第四个参数 n 阅读全文

posted @ 2016-02-15 16:50 Mr_Deng 阅读(274) 评论(0) 推荐(0) 编辑

导航