摘要:
#define ZBColor(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue(b)/255.0 alpha:1.0] 阅读全文
posted @ 2014-11-24 23:06
銱ル╬鎯噹
阅读(141)
评论(0)
推荐(0)
摘要:
屏幕捕捉快捷键 动作:保存到-快捷键 全屏捕捉-桌面(.pdf文件):command + shift + 3 屏幕部分画面-桌面(.pdf文件):command + shift + 4 窗口、图标-桌面(.pdf文件):1. command + shift + 4 2. 空格 全屏捕捉-剪贴板:ct... 阅读全文
posted @ 2014-11-24 17:34
銱ル╬鎯噹
阅读(256)
评论(0)
推荐(0)
摘要:
一、键盘风格 UIKit框架支持8种风格键盘。typedefenum{UIKeyboardTypeDefault,//默认键盘:支持所有字符UIKeyboardTypeASCIICapable,//支持ASCII的默认键盘UIKeyboardTypeNumbersAndPunctuation,//标... 阅读全文
posted @ 2014-11-24 17:32
銱ル╬鎯噹
阅读(564)
评论(0)
推荐(0)
摘要:
[[UIApplication sharedApplication].keyWindow endEditing:YES]; 阅读全文
posted @ 2014-11-24 17:15
銱ル╬鎯噹
阅读(120)
评论(0)
推荐(0)
摘要:
1 NSString *string = @"2013-08-12 20:13:43";2 3 NSDateFormatter *formatter = [[NSDateFormatter alloc] init];4 //格式一定要一致,否则无法转换5 formatter.dateFormat =... 阅读全文
posted @ 2014-11-24 17:13
銱ル╬鎯噹
阅读(93)
评论(0)
推荐(0)
摘要:
NSString* str=@"today"; Person* p1 = [[Person alloc]init]; //nil空对象,NULL表示空类 //方法1:数组的初始化方法 NSArray *array = [[NSArray alloc]initWithObjects:@"123",... 阅读全文
posted @ 2014-11-24 17:04
銱ル╬鎯噹
阅读(115)
评论(0)
推荐(0)
摘要:
1、确定你的项目工程的Resources下有你要用的字体文件(.ttf或者.odf)。2、然后在你的工程的Info.plist文件中新建一行,添加key为:UIAppFonts,类型为Array或Dictionary都行,在UIAppFonts下再建立一个键值对,key为:Item 0,添加Valu... 阅读全文
posted @ 2014-11-24 17:00
銱ル╬鎯噹
阅读(115)
评论(0)
推荐(0)
摘要:
SecondViewController *secondVC=[[SecondViewController alloc]init]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.9]; [UIV... 阅读全文
posted @ 2014-11-24 16:40
銱ル╬鎯噹
阅读(193)
评论(0)
推荐(0)
摘要:
UITextView *textView = [[UITextView alloc]initWithFrame:CGRectMake(0, 100, 320, 200)]; textView.backgroundColor = [UIColor redColor]; textView.textAli... 阅读全文
posted @ 2014-11-24 16:37
銱ル╬鎯噹
阅读(109)
评论(0)
推荐(0)
摘要:
1,这种方法,拨打完电话回不到原来的应用,会停留在通讯录里,而且是直接拨打,不弹出提示NSMutableString * str=[[NSMutableString alloc] initWithFormat:@"tel:%@",@"130xxxx6979"];[[UIApplication sha... 阅读全文
posted @ 2014-11-24 16:31
銱ル╬鎯噹
阅读(140)
评论(0)
推荐(0)
摘要:
注册通知:即要在什么地方接受消息[[NSNotificationCenterdefaultCenter]addObserver:selfselector:@selector(mytest:)name:@" mytest"object:nil];参数介绍:addObserver: 观察者,即在什么地方... 阅读全文
posted @ 2014-11-24 16:13
銱ル╬鎯噹
阅读(135)
评论(0)
推荐(0)
摘要:
一、项目文件结构示意图二、文件介绍1.products文件夹:主要用于mac电脑开发的可执行文件,ios开发用不到这个文件2.frameworks文件夹主要用来放依赖的框架3.test文件夹是用来做单元测试的4.常用的文件夹(项目名称文件夹)(1)XXXinfo.plist文件(在该项目中为 01-... 阅读全文
posted @ 2014-11-24 15:55
銱ル╬鎯噹
阅读(238)
评论(0)
推荐(0)
摘要:
1、初始化+ (NSTimer *)timerWithTimeInterval:(NSTimeInterval)ti target:(id)aTarget selector:(SEL)aSelector userInfo:(id)userInfo repeats:(BOOL)yesOrNo;+ (N... 阅读全文
posted @ 2014-11-24 15:51
銱ル╬鎯噹
阅读(150)
评论(0)
推荐(0)
摘要:
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ UIActionSheet * sheet = [[UIActionSheet alloc] initWithTitle:@"确定要清空图片缓存?" delegate:... 阅读全文
posted @ 2014-11-24 15:47
銱ル╬鎯噹
阅读(99)
评论(0)
推荐(0)
摘要:
1.AVFoundationBuild Phases => Link Binary With Libraies => + => AVFoundation.framework => addfirstviewcontroller.h#import #import @interface FirstView... 阅读全文
posted @ 2014-11-24 15:39
銱ル╬鎯噹
阅读(182)
评论(0)
推荐(0)
摘要:
//点击root,也就是红色的任何处,页面会像翻书一样翻转。翻转到first,也就是蓝色的界面。当点击顶部root页面部分的时候,页面会重新翻到root,也就是红色的界面。 FirstViewController *firstView=[[FirstViewController alloc]in... 阅读全文
posted @ 2014-11-24 15:26
銱ル╬鎯噹
阅读(163)
评论(0)
推荐(0)
摘要:
- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. //初始化背景图 [self initBackgroundView]; }#pragma -makr -func... 阅读全文
posted @ 2014-11-24 15:16
銱ル╬鎯噹
阅读(217)
评论(0)
推荐(0)
摘要:
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ UIAlertView *dialog = [[UIAlertView alloc] initWithTitle:@"请输入分组名称" message:@"\n" de... 阅读全文
posted @ 2014-11-24 15:11
銱ル╬鎯噹
阅读(122)
评论(0)
推荐(0)
摘要:
-(void)touchesBeGan:(NSSet *)touches withEvent:(UIEvent *)event{ //1.url NSURL *url = [NSURL URLWithString:@"http://m.baidu.com"]' //2.request NSU... 阅读全文
posted @ 2014-11-24 13:10
銱ル╬鎯噹
阅读(103)
评论(0)
推荐(0)
摘要:
例如: NSString *string = @"abavavasdsvx,as.dsf/,.[abcdefghijklmn]dgdfg"; NSRange start = [string rangeOfString:@"["]; NSRange end = [string r... 阅读全文
posted @ 2014-11-24 13:08
銱ル╬鎯噹
阅读(271)
评论(0)
推荐(0)
摘要:
typedef enum{LOGIN_SUCCESS,USER_NAME,USER_PASSWORD,OLD_LAT,OLD_LNG}FIELD_SAVED; 阅读全文
posted @ 2014-11-24 12:00
銱ル╬鎯噹
阅读(114)
评论(0)
推荐(0)
摘要:
#pragma mark - Table View//设置section的个数- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1;}//设置每个section 的行数- (NSInteger)tab... 阅读全文
posted @ 2014-11-24 11:40
銱ル╬鎯噹
阅读(193)
评论(0)
推荐(0)
摘要:
IOS5.0之前- (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight;IOS5.0CGFloat top = 25; // 顶端盖高度CGF... 阅读全文
posted @ 2014-11-24 11:02
銱ル╬鎯噹
阅读(139)
评论(0)
推荐(0)
摘要:
static SurveyRunTimeData *sharedObj = nil; //第一步:静态实例,并初始化置为nil。@implementation SurveyRunTimeData+ (SurveyRunTimeData*) sharedInstance//第二步:实例构造检查静态实例... 阅读全文
posted @ 2014-11-24 10:31
銱ル╬鎯噹
阅读(109)
评论(0)
推荐(0)
摘要:
[btn.layer setMasksToBounds:YES];[btn.layer setCornerRadius:4.0]; //设置矩形四个圆角半径 阅读全文
posted @ 2014-11-24 10:22
銱ル╬鎯噹
阅读(123)
评论(0)
推荐(0)
摘要:
通过arc4random() 获取0到x-1之间的整数的代码如下:intvalue=arc4random()%x;获取1到x之间的整数的代码如下:intvalue=(arc4random()%x)+1;最后如果想生成一个浮点数,可以在项目中定义如下宏:#defineARC4RANDOM_MAX0x1... 阅读全文
posted @ 2014-11-24 10:07
銱ル╬鎯噹
阅读(149)
评论(0)
推荐(0)
摘要:
-(BOOL)isValidateEmail:(NSString *)email { NSString *emailRegex = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}"; NSPredicate *emailTest = [NSP... 阅读全文
posted @ 2014-11-24 09:54
銱ル╬鎯噹
阅读(109)
评论(0)
推荐(0)

浙公网安备 33010602011771号