摘要:
#import "YYViewController.h" 10 11 //私有扩展 12 @interface YYViewController () 13 14 @property(nonatomic,weak)IBOutlet UIButton *headImageView; 15 @end... 阅读全文
posted @ 2015-03-11 23:31
pocket_live
阅读(333)
评论(0)
推荐(0)
摘要:
#import "ViewController.h"@interface ViewController ()@property (nonatomic, weak) UITextField *_textName;@property (nonatomic, weak) UITextField *_tex... 阅读全文
posted @ 2015-03-11 23:30
pocket_live
阅读(5932)
评论(0)
推荐(0)
摘要:
#import "ViewController.h"#define kImage @"image"#define kDescribe @"describe"@interface ViewController ()@property (nonatomic, weak) UIImageView *pro... 阅读全文
posted @ 2015-03-11 23:28
pocket_live
阅读(289)
评论(0)
推荐(0)
摘要:
// 实现图片的旋转和移动和放大缩小#import "ViewController.h"@interface ViewController ()@property (nonatomic, weak) UIButton *_btnImage;@end@implementation ViewContro... 阅读全文
posted @ 2015-03-11 23:27
pocket_live
阅读(392)
评论(0)
推荐(0)
摘要:
苹果API常用英语名词:0. indicating 决定1.in order to 以便2.rectangle bounds 矩形尺寸3.applied 应用4.entirety 全部5.technique 方法6.truncating 截短7.wrapping 换行8.string 字符串9.f... 阅读全文
posted @ 2015-03-11 23:26
pocket_live
阅读(180)
评论(0)
推荐(0)
摘要:
纯代码创建Button控件:// 创建按钮UIButton *btn = [[UIButton alloc] init];// 添加按钮[self.view addSubview:btn];// 设置framebtn.frame = CGRectMake(50, 50, 100, 100);// 设... 阅读全文
posted @ 2015-03-11 23:25
pocket_live
阅读(403)
评论(0)
推荐(0)
摘要:
Date Picker控件:中文:日期/时间选取器UIDatePicker有一个实例方法setDate:animated,以编程的方式选择日期。UIDatePicker有四种模式(model): Time(... 阅读全文
posted @ 2015-03-11 23:23
pocket_live
阅读(612)
评论(0)
推荐(0)
摘要:
Picker View控件:中文:单滚轮选择器自定义选择器需要遵守两个协议:数据源协议和委托协议UIPickerView有一个实例方法selectRow:(NSInteger)inComponent:(NSInteger)animated:(BOOL),以编程的方式来选择值。UIPickerView... 阅读全文
posted @ 2015-03-11 23:22
pocket_live
阅读(570)
评论(0)
推荐(0)
摘要:
UIPickerView常用属性 -- 小总结 一.UIPickerView1.UIPickerView的常见属性// 数据源(用来告诉UIPickerView有多少列多少行)@property(nonatomic,assign) id dataSource;// 代理(用来告诉UIPickerVi... 阅读全文
posted @ 2015-03-11 23:20
pocket_live
阅读(235)
评论(0)
推荐(0)
摘要:
设置代理:例如:// 以UIPickerView为例 picker.dataSource = self; picker.delegate = self; picker.showsSelectionIndicator = YES; // 这个弄成YES, picker中间就... 阅读全文
posted @ 2015-03-11 23:19
pocket_live
阅读(162)
评论(0)
推荐(0)
摘要:
stringWithFormat 和 initWithFormat 有何不同?+ stringWithFormat:– initWithFormat:一个类方法,一个实例方法 都是格式化字符串1、 initWithFormat是实例方法只能通过 NSString* str = [[NSStr... 阅读全文
posted @ 2015-03-11 23:16
pocket_live
阅读(295)
评论(0)
推荐(0)
摘要:
#pragma 用法: 任何以#pragma开头的代码都是一条编译器指令。使弹出菜单更加有效。例如: // 在菜单中添加了一条分隔线。 #pragma mark - // 创建一个文本条目。... 阅读全文
posted @ 2015-03-11 23:15
pocket_live
阅读(124)
评论(0)
推荐(0)
摘要:
UISwitch控件属性:1. onTintColor 处于on时switch 的颜色 switchImage.onTintColor = [UIColor grayColor];2.tintColor 处于off时switch 的颜色 switchImage.tintColor =... 阅读全文
posted @ 2015-03-11 23:11
pocket_live
阅读(149)
评论(0)
推荐(0)
摘要:
UIView控件属性:1.alpha设置视图的透明度.默认为1. // 完全透明 view.alpha = 0; // 不透明 view.alpha = 1;2.clipsToBounds // 默认是NO,当设置为yes时,超出当前视图的尺寸的内容和子视图不会显示。 vie... 阅读全文
posted @ 2015-03-11 23:10
pocket_live
阅读(149)
评论(0)
推荐(0)
摘要:
UIImageView控件属性:1.Image 设置图片,默认显示 UIImageView *_imageView = [[UIImageView alloc]init];_imageView.image = [UIImage imageNamed:@"me.png"];2.highlightedI... 阅读全文
posted @ 2015-03-11 23:09
pocket_live
阅读(121)
评论(0)
推荐(0)
摘要:
UITextView控件属性:1.text: 设置textView中文本_textView.text = @"Now is the time for all good developers to come to serve their country.\n\nNow is the time for ... 阅读全文
posted @ 2015-03-11 23:08
pocket_live
阅读(173)
评论(0)
推荐(0)
摘要:
UIButton控件属性:1.UIButton状态:UIControlStateNormal // 正常状态 UIControlStateHighlighted // 高亮状态 UIControlStateDisabled // 禁用状态 UIC... 阅读全文
posted @ 2015-03-11 23:05
pocket_live
阅读(145)
评论(0)
推荐(0)
摘要:
UITextField控件属性:enablesReturnKeyAutomatically默认为No,如果设置为Yes,文本框中没有输入任何字符的话,右下角的返回按钮是disabled的。1.borderStyle设置边框样式,只有设置了才会显示边框样式 text.borderStyle = U... 阅读全文
posted @ 2015-03-11 23:03
pocket_live
阅读(196)
评论(0)
推荐(0)
摘要:
1 UILabel控件属性: 2 1.text:设置标签显示文本。 3 4 2.attributedText:设置标签属性文本。 5 6 Ios代码 7 8 NSString *text = @"first"; 9 10 NSMutableAttributedString *textLabe... 阅读全文
posted @ 2015-03-11 20:55
pocket_live
阅读(229)
评论(0)
推荐(0)

浙公网安备 33010602011771号