自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 收藏
  • 关注

转载 面向对象的----多态性

多态性:以子类的方法初始化父类对象。 class A:B B b = [[A alloc]init]; //此时在调用init方法,是调用的子类的init 而不是父类的init [b init]; //此init是子类A的init方法 转载于:https://www.cnblogs.com/AngryCooder/p/3905878.html...

2014-08-11 22:56:00 61

转载 UIWebView控件

用处:实现一个web浏览器,加载静态html,动态url,调用js //加载动态url self.webView = [[UIWebView alloc]initWithFrame:self.view.bounds]; NSString *str = @"http://www.baidu.com"; NSURL *url = [NSURL URLWithString:str]; ...

2014-08-11 15:11:00 53

转载 UIImageView控件

-(void)viewDidLoad {   [super viewDidLoad];   //uiimage   UIImage *img = [[UIImageView alloc]initWithImage:img];   //image view   self.imageView = [[UIImageView alloc]initWithImage:img];  ...

2014-08-11 14:42:00 49

转载 UIDatePicker控件

用处:选择日期或时间 当选择新的日期或时间的时候,值改变事件会被触发 -(void)viewDidLoad {   CGRect frame = CGRectMake(20,20,320,100);   self.datePicker = [[UIDatePicker alloc]initWithFrame:frame];   //设置显示模式   self.dateP...

2014-08-07 16:53:00 49

转载 UIActivityIndicatorView控件

用处: 菊花图 仅有两个方法:[aiv startAnimating]        [aiv stopAnimating] -(void)viewDidLoad {   [super viewDidLoad];   self.aiv = [[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:UIActi...

2014-08-07 14:41:00 49

转载 UIProgressView控件

用处:进度条视图,用来显示某个任务的当前状态 -(void)viewDidLoad {   [self viewDidLoad];   self.timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(change:) userInfo:nil repeats:YES]; ...

2014-08-07 13:56:00 52

转载 XIB文件链接controller文件&&加载rootviewcontroller

1.定义好的xib文件rootView.xib,选中files·owners 在class中选择对应的viewController 2.如何在window中指定rootViewController ------在appdelegate.h中声明属性  @property (strong,nonatomic)rootViewController* rvc; ------在appd...

2014-08-07 10:02:00 69

转载 UISegmentedControl控件

用处:多分段选择控件,选中某个分段会触发值改变事件。 -(void)viewDidLoad {   [super viewDidLoad];   NSArray* items = @[@"a",@"b",@"c"]; self.seg = [[UISegmentedControl alloc]initWithItems:items]; CGRect f...

2014-08-06 17:20:00 51

转载 UISlider控件

用处:在一个连续的区间中选择一个值 -(void)viewDidLoad {   [super viewDidLoad];   CGRect frame = CGRectMake(20,20,200,0); self.slider = [[UISlider alloc]initWithFrame:frame]; //设置最小值 self....

2014-08-06 16:12:00 70

转载 UISwitch控件

用处:开关空间,用于处理两种状态 -(void)viewDidLoad { [super viewDidLoad]; CGRect frame = CGRectMake(20,20,0,0); self.switch = [[UISwitch alloc]initWithFrame:frame]; //设置初始状态 [self.switch setOn:Y...

2014-08-06 15:25:00 45

转载 UITextField控件

用处:输入控件 -(void)viewDidLoad { [super viewDidLoad]; //设置大小 CGRect frame = CGRectMake(20,20,150,40); //实例化UITextField self.tf = [[UITextField alloc]initWithFrame:frame]; //提示信息(灰体) self.t...

2014-08-06 14:56:00 48

转载 Target-Action设计模式

含义: 当某个事件发生时,调用某个对象的某个方法 一般情况下,对象就是target,方法就是action target是controller,action是action 使用方法: 1,创建按钮 2,在controller.h文件中声明action 3,在controller.m文件中实现action 3,给button控件关联action -(void)addTarg...

2014-08-06 14:37:00 82

转载 UIButton控件

-(void)viewDidLoad{ //初始化 self.btn1 = [UIBotton buttonWithType:UIButtonTypeRoundedRect]; //设置大小 self.btn1.frame = CGRectMake(20,20,100,50); //设置标题 [self.btn1 setTitle:@"Hello" forState:UICo...

2014-08-06 14:17:00 65

转载 UIKit 小结

从今天起,开始学习UIKit部分,在此做个记录,不会充分详细的解释细节,只是要做一个备忘一样的东西。 1.UIView类继承自UIResponder继承自NSObject 2.UIResponder类定义了一些操作 3.UIView有三个属性: frame, bounds, center   frame用于代码控制控件的大小与位置   center用于改变控件位置, bou...

2014-08-06 11:39:00 62

转载 博文推荐:minglz in cnbolg

博文推荐:minglz in cnbolg 转载于:https://www.cnblogs.com/AngryCooder/p/3878421.html

2014-07-30 16:41:00 58

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除