摘要:
#define ZBColor(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue(b)/255.0 alpha:1.0] 阅读全文
摘要:
屏幕捕捉快捷键 动作:保存到-快捷键 全屏捕捉-桌面(.pdf文件):command + shift + 3 屏幕部分画面-桌面(.pdf文件):command + shift + 4 窗口、图标-桌面(.pdf文件):1. command + shift + 4 2. 空格 全屏捕捉-剪贴板:ct... 阅读全文
摘要:
一、键盘风格 UIKit框架支持8种风格键盘。typedefenum{UIKeyboardTypeDefault,//默认键盘:支持所有字符UIKeyboardTypeASCIICapable,//支持ASCII的默认键盘UIKeyboardTypeNumbersAndPunctuation,//标... 阅读全文
摘要:
[[UIApplication sharedApplication].keyWindow endEditing:YES]; 阅读全文
摘要:
1 NSString *string = @"2013-08-12 20:13:43";2 3 NSDateFormatter *formatter = [[NSDateFormatter alloc] init];4 //格式一定要一致,否则无法转换5 formatter.dateFormat =... 阅读全文
摘要:
NSString* str=@"today"; Person* p1 = [[Person alloc]init]; //nil空对象,NULL表示空类 //方法1:数组的初始化方法 NSArray *array = [[NSArray alloc]initWithObjects:@"123",... 阅读全文
摘要:
1、确定你的项目工程的Resources下有你要用的字体文件(.ttf或者.odf)。2、然后在你的工程的Info.plist文件中新建一行,添加key为:UIAppFonts,类型为Array或Dictionary都行,在UIAppFonts下再建立一个键值对,key为:Item 0,添加Valu... 阅读全文
摘要:
SecondViewController *secondVC=[[SecondViewController alloc]init]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.9]; [UIV... 阅读全文
摘要:
UITextView *textView = [[UITextView alloc]initWithFrame:CGRectMake(0, 100, 320, 200)]; textView.backgroundColor = [UIColor redColor]; textView.textAli... 阅读全文
摘要:
1,这种方法,拨打完电话回不到原来的应用,会停留在通讯录里,而且是直接拨打,不弹出提示NSMutableString * str=[[NSMutableString alloc] initWithFormat:@"tel:%@",@"130xxxx6979"];[[UIApplication sha... 阅读全文
摘要:
注册通知:即要在什么地方接受消息[[NSNotificationCenterdefaultCenter]addObserver:selfselector:@selector(mytest:)name:@" mytest"object:nil];参数介绍:addObserver: 观察者,即在什么地方... 阅读全文
摘要:
一、项目文件结构示意图二、文件介绍1.products文件夹:主要用于mac电脑开发的可执行文件,ios开发用不到这个文件2.frameworks文件夹主要用来放依赖的框架3.test文件夹是用来做单元测试的4.常用的文件夹(项目名称文件夹)(1)XXXinfo.plist文件(在该项目中为 01-... 阅读全文
摘要:
1、初始化+ (NSTimer *)timerWithTimeInterval:(NSTimeInterval)ti target:(id)aTarget selector:(SEL)aSelector userInfo:(id)userInfo repeats:(BOOL)yesOrNo;+ (N... 阅读全文
摘要:
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ UIActionSheet * sheet = [[UIActionSheet alloc] initWithTitle:@"确定要清空图片缓存?" delegate:... 阅读全文
摘要:
1.AVFoundationBuild Phases => Link Binary With Libraies => + => AVFoundation.framework => addfirstviewcontroller.h#import #import @interface FirstView... 阅读全文
摘要:
//点击root,也就是红色的任何处,页面会像翻书一样翻转。翻转到first,也就是蓝色的界面。当点击顶部root页面部分的时候,页面会重新翻到root,也就是红色的界面。 FirstViewController *firstView=[[FirstViewController alloc]in... 阅读全文
摘要:
- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. //初始化背景图 [self initBackgroundView]; }#pragma -makr -func... 阅读全文
摘要:
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ UIAlertView *dialog = [[UIAlertView alloc] initWithTitle:@"请输入分组名称" message:@"\n" de... 阅读全文
摘要:
-(void)touchesBeGan:(NSSet *)touches withEvent:(UIEvent *)event{ //1.url NSURL *url = [NSURL URLWithString:@"http://m.baidu.com"]' //2.request NSU... 阅读全文
摘要:
例如: NSString *string = @"abavavasdsvx,as.dsf/,.[abcdefghijklmn]dgdfg"; NSRange start = [string rangeOfString:@"["]; NSRange end = [string r... 阅读全文