09 2015 档案

摘要:NSString *url = @"MyUrl://"; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];在另一个应用程序中按照上边的操作添加MyUrl并运行,就可以跳转了 阅读全文
posted @ 2015-09-30 15:06 阿凡提王 阅读(424) 评论(0) 推荐(0)
摘要:隐藏状态栏- (BOOL)prefersStatusBarHidden{ return YES;} 阅读全文
posted @ 2015-09-30 13:34 阿凡提王 阅读(92) 评论(0) 推荐(0)
摘要:/* /*1.设置导航栏@“联系人”2.创建数据源:a:aa aaa aaaa3.完成Table view data source4.段头段尾设置ABCDEF...5.设置索引6.创建搜索栏目,创建一个新的视图控制器给搜索栏,让它显示搜索结果,放在表头位置上7.搜索栏更新协议*/*/--------... 阅读全文
posted @ 2015-09-28 20:32 阿凡提王 阅读(159) 评论(0) 推荐(0)
摘要:/*1.创建一个导航栏2.写一个数据源3.创建搜索栏a.让tableView的表头等于搜索栏b.把搜索栏控制器用搜索栏初始化self.sdc = [[UISearchDisplayController alloc] initWithSearchBar:self.searchBar contentsC... 阅读全文
posted @ 2015-09-28 19:33 阿凡提王 阅读(103) 评论(0) 推荐(0)
摘要:/*1.定制导航栏2.创建数据元a .分配内存和初始化b.创建三个段数组section1,section2,section3c.加入数据源数组中dataArray3.写两个dataSource的协议方法:设置行,宽和设置cell中内容4.在设置段头的方法中把按钮加入段头,记得设置段头的高度5.UIT... 阅读全文
posted @ 2015-09-28 19:09 阿凡提王 阅读(198) 评论(0) 推荐(0)
摘要:1.创建导航栏2.创建数据源3.在按钮的编辑响应事件方法中让tableview可以多选可以和可以编辑4.在按钮删除的响应事件方法中,对选择的数组进行排序后删除,然后设置回不可多选和编辑//.h文件中继承UITableViewController// MyTableViewController.h//... 阅读全文
posted @ 2015-09-28 18:49 阿凡提王 阅读(394) 评论(0) 推荐(0)
摘要:1.普通设置 self.window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen]bounds]]; self.window.backgroundColor = [UIColor orangeColor]; ViewControl... 阅读全文
posted @ 2015-09-28 17:30 阿凡提王 阅读(172) 评论(0) 推荐(0)
摘要:// button.titleLabel.textAlignment = NSTextAlignmentLeft; 这句无效 button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft; ... 阅读全文
posted @ 2015-09-28 13:01 阿凡提王 阅读(673) 评论(0) 推荐(0)
摘要:[UIView animateWithDuration:1.0 animations:^{ label.alpha=1.0; } completion:^(BOOL finished) { [UIView animateWithDuration:1.0 animations:^{ label.a... 阅读全文
posted @ 2015-09-25 23:53 阿凡提王 阅读(199) 评论(0) 推荐(0)
摘要:- (UIImage *)clipImage: (UIImage *)image inRect: (CGRect) rect{ //返回image中rect范围内的图片 CGImageRef imageRef = CGImageCreateWithImageInRect(image.CGImage,... 阅读全文
posted @ 2015-09-25 23:41 阿凡提王 阅读(390) 评论(0) 推荐(0)
摘要://// AppDelegate.m// TabBarControllerDemo//// Created by qianfeng on 15/9/22.// Copyright (c) 2015年 qianfeng. All rights reserved.//#import "AppDelega... 阅读全文
posted @ 2015-09-25 22:00 阿凡提王 阅读(309) 评论(0) 推荐(0)
摘要:#define COLOR_VALUE arc4random() % 256 /255.0//宏定义@interface FirstViewController (){ NSTimer *_timer;}//定义一个事件的属性[self createBackCorlor];//方法的调用#pragm... 阅读全文
posted @ 2015-09-25 20:49 阿凡提王 阅读(290) 评论(0) 推荐(0)
摘要://// ViewController.m// UIScollView//// Created by hehe on 15/9/25.// Copyright (c) 2015年 wang.hehe. All rights reserved.//#import "ViewController.h"#... 阅读全文
posted @ 2015-09-25 19:17 阿凡提王 阅读(230) 评论(0) 推荐(0)
摘要://// nextViewController.m#import "nextViewController.h"#import "my.h"@interface nextViewController ()@end@implementation nextViewController- (void)vie... 阅读全文
posted @ 2015-09-25 07:41 阿凡提王 阅读(187) 评论(0) 推荐(0)
摘要:1.在第一个页面进入第二个页面可以使用莫泰的方式在第一个页面包含第二个页面的头文件#import "FirstViewController.h"#import "ViewController.h",上面的红色是要进入的第二个界面,黑色是本界面2.在第一个界面的某个按键响应中写下边代码 //准备切换界... 阅读全文
posted @ 2015-09-24 22:26 阿凡提王 阅读(157) 评论(0) 推荐(0)
摘要://tint color是设置你选中的那个tabBar的颜色,默认是蓝色,点击是设置的红色 vc.tabBar.tintColor = [UIColor redColor]; //bar tint color vc.tabBar.barTintColor = [UIColor orangeCol... 阅读全文
posted @ 2015-09-22 20:33 阿凡提王 阅读(286) 评论(0) 推荐(0)
摘要://// ViewController.m// imageview添加按钮//// Created by hehe on 15/9/22.// Copyright (c) 2015年 wang.hehe. All rights reserved.//#import "ViewController.h... 阅读全文
posted @ 2015-09-22 18:28 阿凡提王 阅读(333) 评论(0) 推荐(0)
摘要://// MyviewViewController.h// XibDemo//// Created by hehe on 15/9/21.// Copyright (c) 2015年 wang.hehe. All rights reserved.//#import @interface Myview... 阅读全文
posted @ 2015-09-21 22:11 阿凡提王 阅读(155) 评论(0) 推荐(0)
摘要:#import "ViewController.h"#define width_screen self.view.bounds.size.width#define height_screen self.view.bounds.size.height@interface ViewController ... 阅读全文
posted @ 2015-09-21 22:02 阿凡提王 阅读(116) 评论(0) 推荐(0)
摘要://// ViewController.h// UIAlertViewAndUIActionSheet//// Created by hehe on 15/9/21.// Copyright (c) 2015年 wang.hehe. All rights reserved.//#import @in... 阅读全文
posted @ 2015-09-21 21:58 阿凡提王 阅读(139) 评论(0) 推荐(0)
摘要://// ViewController.m// ProgressAndSteper//// Created by hehe on 15/9/21.// Copyright (c) 2015年 wang.hehe. All rights reserved.//#import "ViewControll... 阅读全文
posted @ 2015-09-21 21:55 阿凡提王 阅读(210) 评论(0) 推荐(0)
摘要://// ViewController.m// SecmentAndSilder//// Created by hehe on 15/9/21.// Copyright (c) 2015年 wang.hehe. All rights reserved.//#import "ViewControlle... 阅读全文
posted @ 2015-09-21 21:52 阿凡提王 阅读(482) 评论(0) 推荐(0)
摘要://// ViewController.m// SwithAndActivity//// Created by qianfeng on 15/9/21.// Copyright (c) 2015年 qianfeng. All rights reserved.//#import "ViewContro... 阅读全文
posted @ 2015-09-21 21:46 阿凡提王 阅读(213) 评论(0) 推荐(0)
摘要://// ViewController.m// UIButtonDemo//// Created by hehe on 15/9/15.// Copyright (c) 2015年 wang.hehe. All rights reserved.//#import "ViewController.h"... 阅读全文
posted @ 2015-09-17 07:20 阿凡提王 阅读(5375) 评论(0) 推荐(0)
摘要:#import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; //创建view对象 UIView *... 阅读全文
posted @ 2015-09-17 06:50 阿凡提王 阅读(135) 评论(0) 推荐(0)
摘要:#import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; UIView *subView1 = ... 阅读全文
posted @ 2015-09-16 23:33 阿凡提王 阅读(282) 评论(0) 推荐(0)
摘要://// ViewController.m// SuperViewSonView//// Created by hehe on 15/9/16.// Copyright (c) 2015年 wang.hehe. All rights reserved.//#import "ViewControlle... 阅读全文
posted @ 2015-09-16 23:30 阿凡提王 阅读(617) 评论(0) 推荐(0)
摘要:#import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; [self creatPic]; }-... 阅读全文
posted @ 2015-09-16 23:24 阿凡提王 阅读(213) 评论(0) 推荐(0)
摘要://1.添加一个.gif类型的动态的图片,用到URLForResource方法,gif是图片的格式,FlagZombie是图片的名字@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; NSURL *url... 阅读全文
posted @ 2015-09-16 23:03 阿凡提王 阅读(131) 评论(0) 推荐(0)
摘要://// ViewController.m// UIButtonDemo//// Created by hehe on 15/9/15.// Copyright (c) 2015年 wang.hehe. All rights reserved.//#import "ViewController.h"... 阅读全文
posted @ 2015-09-15 11:19 阿凡提王 阅读(132) 评论(0) 推荐(0)
摘要:/* 写一个block传值 ,让两个数进行相除和相乘,在运行时动态决定采用哪种计算方式*/#import int main(int argc, const char * argv[]) { @autoreleasepool { typedef int(^MathBlock)(int,int); Ma... 阅读全文
posted @ 2015-09-11 14:44 阿凡提王 阅读(207) 评论(0) 推荐(0)
摘要:委托方要遵守代理,就要继承代理,并且要实现代理/*1. 老板不定期的组织活动,每次都让小明统计参加活动的人数,小明每次将参加活动的人数上报给老板,老板很高兴。*///main/*1. 老板不定期的组织活动,每次都让小明统计参加活动的人数,小明每次将参加活动的人数上报给老板,老板很高兴。*/#impo... 阅读全文
posted @ 2015-09-11 14:38 阿凡提王 阅读(161) 评论(0) 推荐(0)
摘要://main.m//// main.m// 回调//// Created by hehe on 15/9/10.// Copyright (c) 2015年 wang.hehe. All rights reserved.//#import #import "Employee.h"#import "C... 阅读全文
posted @ 2015-09-10 19:42 阿凡提王 阅读(176) 评论(0) 推荐(0)
摘要:http://www.tuicool.com/articles/QRbq22n 阅读全文
posted @ 2015-09-10 19:37 阿凡提王 阅读(103) 评论(0) 推荐(0)
摘要:/*1.将通讯录类(姓名、电话),添加归档和解归档方法,即,添加储存信息到磁盘的方法。*/#import #import "ConTact.h"#define PATH @"/Users/qianfeng/Desktop/hehe/2.plist"int main(int argc, const c... 阅读全文
posted @ 2015-09-10 19:14 阿凡提王 阅读(265) 评论(0) 推荐(0)
摘要:/*2.创建一个数组,数组中保存一批量的学生信息,把该数组信息储存到磁盘上,并能解归档出来*/#import #define path @"/Users/qianfeng/Desktop/hehe/5.plist"int main(int argc, const char * argv[]) { @... 阅读全文
posted @ 2015-09-10 19:13 阿凡提王 阅读(338) 评论(0) 推荐(0)
摘要:/*4.创建一个目录info,并在目录中创建一个文件test.txt,把该文件的信息读取出来,并显示出来*/#import #define PATH @"/Users/qianfeng/Desktop/hehe/info"#define PATH1 @"/Users/qianfeng/Desktop... 阅读全文
posted @ 2015-09-10 19:11 阿凡提王 阅读(1024) 评论(0) 推荐(0)
摘要:/*XPath 术语节点(Node)在 XPath 中,有七种类型的节点:元素、属性、文本、命名空间、处理指令、注释以及文档(根)节点。XML 文档是被作为节点树来对待的。树的根被称为文档节点或者根节点。请看下面这个 XML 文档: ios开发指南r 千锋3G 2012 88.88 ios开发... 阅读全文
posted @ 2015-09-10 19:03 阿凡提王 阅读(372) 评论(0) 推荐(0)
摘要://下边的例子可以把数组元素逆序输出#import int main(int argc, const char * argv[]) { @autoreleasepool { NSArray *array = @[@"1",@"a",@"c",@"e"]; NSEnumerator *unum; un... 阅读全文
posted @ 2015-09-09 20:45 阿凡提王 阅读(452) 评论(0) 推荐(0)
摘要://// main.m// homewoek//// Created by hehe on 15/9/9.// Copyright (c) 2015年 wang.hehe. All rights reserved.//#import #import "GDataXMLNode.h"#import "... 阅读全文
posted @ 2015-09-09 20:26 阿凡提王 阅读(151) 评论(0) 推荐(0)
摘要:main(){ int a[5]={1,2,3,4,5}; int *ptr=(int *)(&a+1);printf("%d,%d",*(a+1),*(ptr-1));}答:2,5 *(a+1)就是a[1],*(ptr-1)就是a[4],执行结果是2,5 &a+1不是首地址+1,系统会认为加一... 阅读全文
posted @ 2015-09-09 12:57 阿凡提王 阅读(136) 评论(0) 推荐(0)
摘要://my.h#ifndef __1_Header_h#define __1_Header_h#define DEBUG 1#define aa 1#ifdef aa#ifdef DEBUG#define NSLog(FORMAT, ...) fprintf(stderr,"%s\n",[[NSStr... 阅读全文
posted @ 2015-09-08 21:11 阿凡提王 阅读(309) 评论(0) 推荐(0)
摘要://解析的东西是数组就用数组接受,是字典就用字典接受//my.h#ifndef __1_Header_h#define __1_Header_h#define DEBUG 1#define aa 1#ifdef aa#ifdef DEBUG#define NSLog(FORMAT, ...) fpr... 阅读全文
posted @ 2015-09-08 16:17 阿凡提王 阅读(174) 评论(0) 推荐(0)
摘要:/*代理:.......................................................................................【委托方】主动方 持有带协议的id指针,可以使用协议。【代理方】被动方 遵从协议,实现方法。代理:............ 阅读全文
posted @ 2015-09-08 08:31 阿凡提王 阅读(233) 评论(0) 推荐(0)
摘要:/*就是这*********************************回调函数不是由该函数的实现方法直接调用,而是在特定的事件或条件发生时由另外的一方调用的,用于对该事件或条件进行响应。回调:...................................................... 阅读全文
posted @ 2015-09-08 08:19 阿凡提王 阅读(303) 评论(0) 推荐(0)
摘要:/*.h#import @interface Person : NSObject@property (nonatomic) int pid;@property (nonatomic,copy) NSString *name;@property (nonatomic) int age;@end*//*... 阅读全文
posted @ 2015-09-07 07:19 阿凡提王 阅读(257) 评论(0) 推荐(0)
摘要:#import @interface Person : NSObject- (void)test1;- (void)test2:(NSString *)str;@end@implementation Person- (void)test1{ NSLog(@"无参数的对象方法");}- (void)... 阅读全文
posted @ 2015-09-02 18:52 阿凡提王 阅读(228) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2015-09-02 17:23 阿凡提王 阅读(16) 评论(0) 推荐(0)