不疯不成魔

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2015年9月13日

摘要: AppDelegate.m- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { /** 沙盒中文件夹: 1.Do... 阅读全文
posted @ 2015-09-13 22:06 不疯不成魔 阅读(3443) 评论(0) 推荐(0) 编辑

摘要: 第一种从资源包中加载cellstatic NSString *identifier = @"resuse"; EditCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; if(!cell){ ... 阅读全文
posted @ 2015-09-13 21:45 不疯不成魔 阅读(414) 评论(0) 推荐(0) 编辑

摘要: RootViewController.m#import "RootViewController.h"#import "UIImage+UIImageScale.h"@interface RootViewController ()@property (nonatomic, retain) NSArra... 阅读全文
posted @ 2015-09-13 21:32 不疯不成魔 阅读(532) 评论(0) 推荐(0) 编辑

摘要: #import "ViewController.h"#import "SecondViewController.h"@interface ViewController ()@property (retain, nonatomic) IBOutlet UITextField *textField;@e... 阅读全文
posted @ 2015-09-13 21:20 不疯不成魔 阅读(414) 评论(0) 推荐(0) 编辑

摘要: 第三方SAT解析#import "SAXTableViewController.h"#import "Student.h"@interface SAXTableViewController ()@property (nonatomic, retain) NSMutableArray *dataSou... 阅读全文
posted @ 2015-09-13 20:51 不疯不成魔 阅读(316) 评论(0) 推荐(0) 编辑

摘要: 1.用到的一些第三方PostTableViewController.m#import "PostTableViewController.h"@interface PostTableViewController ()@property(nonatomic,retain) NSArray *dataAr... 阅读全文
posted @ 2015-09-13 20:33 不疯不成魔 阅读(282) 评论(0) 推荐(0) 编辑

摘要: ContactListController.m#import "ContactListController.h"#import "FMDatabase.h" // 第三方数据库操作类#import "ContactCell.h"#import "DetailViewController.h"#imp... 阅读全文
posted @ 2015-09-13 20:29 不疯不成魔 阅读(267) 评论(1) 推荐(0) 编辑

2015年9月7日

摘要: #import #import "Person.h"#import "Student.h"int main(int argc, const char * argv[]) { @autoreleasepool { //创建Person对象 Person *p = [[Per... 阅读全文
posted @ 2015-09-07 20:07 不疯不成魔 阅读(141) 评论(0) 推荐(0) 编辑

2015年9月4日

摘要: #import "RootViewController.h"#import "Htohero.h"@interface RootViewController ()@property (nonatomic, retain) NSArray *apps;@end@implementation RootV... 阅读全文
posted @ 2015-09-04 21:11 不疯不成魔 阅读(2072) 评论(0) 推荐(0) 编辑

2015年8月27日

摘要: @interface AppDelegate ()@end@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *... 阅读全文
posted @ 2015-08-27 22:24 不疯不成魔 阅读(235) 评论(0) 推荐(0) 编辑

摘要: #import "AppDelegate.h"@interface AppDelegate ()@end@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWith... 阅读全文
posted @ 2015-08-27 22:23 不疯不成魔 阅读(199) 评论(0) 推荐(0) 编辑

摘要: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[[UIWindow alloc] ini... 阅读全文
posted @ 2015-08-27 22:22 不疯不成魔 阅读(183) 评论(0) 推荐(0) 编辑

摘要: #import "AppDelegate.h"@interface AppDelegate ()@end@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWith... 阅读全文
posted @ 2015-08-27 22:20 不疯不成魔 阅读(308) 评论(0) 推荐(0) 编辑

摘要: #import "AppDelegate.h"@interface AppDelegate ()@end@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWith... 阅读全文
posted @ 2015-08-27 22:18 不疯不成魔 阅读(163) 评论(0) 推荐(0) 编辑

摘要: RootViewController//视图控制器(UIViewController):它不是视图,用来管理视图,所以屏幕上看不到,但是自身携带一个视图(根视图)#import "RootViewController.h"#import "LoginView.h"//视图控制器的延展@interfa... 阅读全文
posted @ 2015-08-27 22:17 不疯不成魔 阅读(3381) 评论(0) 推荐(0) 编辑

摘要: RootViewController#import "RootViewController.h"#import "TouchView.h"#import "PanView.h"#import "PinchView.h"@interface RootViewController ()@end@impl... 阅读全文
posted @ 2015-08-27 22:11 不疯不成魔 阅读(2809) 评论(0) 推荐(0) 编辑

摘要: #import "RootViewController.h"@interface RootViewController ()@end@implementation RootViewController- (void)viewDidLoad { [super viewDidLoad]; /... 阅读全文
posted @ 2015-08-27 22:05 不疯不成魔 阅读(919) 评论(0) 推荐(0) 编辑

摘要: //两种设计模式详解//target/action设计模式1.给当前的视图添加触摸响应事件,2.当触摸时响应//代理设计模式 协议和代理的使用; 当自定义协议时的使用步骤: 126是在委托方实现的,345是在代理方实现的 1.定义协议(协议中存储代理应该完成的任务) 1.... 阅读全文
posted @ 2015-08-27 21:59 不疯不成魔 阅读(395) 评论(0) 推荐(0) 编辑

摘要: 响应者链就是当子视图不响应,父视图有响应事件,父视图响应#import "RootViewController.h"#import "ResponderView.h"@interface RootViewController ()@end@implementation RootViewControl... 阅读全文
posted @ 2015-08-27 21:50 不疯不成魔 阅读(170) 评论(0) 推荐(0) 编辑

摘要: @implementation AppDelegate//当应用程序加载时触发,创建window窗口对象,让对象的window成为程序的主窗口,并且可视.- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOp... 阅读全文
posted @ 2015-08-27 21:43 不疯不成魔 阅读(761) 评论(0) 推荐(0) 编辑

摘要: UIView *view5 = [[UIView alloc] initWithFrame:CGRectMake(80, 280, 30, 30)]; view5.backgroundColor = [UIColor redColor]; view5.backgroundC... 阅读全文
posted @ 2015-08-27 21:38 不疯不成魔 阅读(316) 评论(0) 推荐(0) 编辑

摘要: Appdelegate中- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[[UIWindo... 阅读全文
posted @ 2015-08-27 21:29 不疯不成魔 阅读(317) 评论(0) 推荐(0) 编辑

摘要: #import "RootViewController.h"@interface RootViewController ()@end@implementation RootViewController- (void)viewDidLoad { [super viewDidLoad]; /... 阅读全文
posted @ 2015-08-27 21:22 不疯不成魔 阅读(337) 评论(0) 推荐(0) 编辑

摘要: #import "RootViewController.h"#define kScreenWidth [UIScreen mainScreen].bounds.size.width#define kScreenHeight [UIScreen mainScreen].bounds.size.heig... 阅读全文
posted @ 2015-08-27 21:20 不疯不成魔 阅读(829) 评论(0) 推荐(0) 编辑

摘要: #import "RootViewController.h"#import "SecondViewController.h"#define kScreenWidth [UIScreen mainScreen].bounds.size.width#define kScreenHeight [UIScr... 阅读全文
posted @ 2015-08-27 21:17 不疯不成魔 阅读(300) 评论(0) 推荐(0) 编辑

摘要: NSArray *arrayText = @[@"用户名",@"密码",@"确认密码",@"手机号",@"邮箱"]; NSArray *placeholders = @[@"请输入用户名",@"请输入密码",@"请确认密码",@"请输入手机号",@"请输入邮箱"]; NSIn... 阅读全文
posted @ 2015-08-27 20:45 不疯不成魔 阅读(734) 评论(0) 推荐(0) 编辑

摘要: #import "RootViewController.h"#import "UIColor+MyUIColor.h"@interface RootViewController ()@end@implementation RootViewController/* UITapGestureRecogn... 阅读全文
posted @ 2015-08-27 20:40 不疯不成魔 阅读(271) 评论(0) 推荐(0) 编辑

2015年8月18日

摘要: #import "ViewController.h"//纯手工打造@interface ViewController ()@property (weak, nonatomic) UIButton *leftUpBtn;@property (weak, nonatomic) UIButton *r... 阅读全文
posted @ 2015-08-18 09:26 不疯不成魔 阅读(174) 评论(0) 推荐(0) 编辑

摘要: #import "ViewController.h"@interface ViewController ()@property (weak, nonatomic) IBOutlet UIImageView *imageView;- (IBAction)drink;- (IBAction)tou;@e... 阅读全文
posted @ 2015-08-18 09:23 不疯不成魔 阅读(255) 评论(0) 推荐(0) 编辑

2015年8月14日

摘要: //这里的string是常量区没有引用计数 /* NSString 类下有许多类触,每个类触有不同的功能,比如:[NSString stringWithFormat:@"lanou"]当@"lanou"小于某个长度时是存在常量区,返回整数... 阅读全文
posted @ 2015-08-14 13:02 不疯不成魔 阅读(1044) 评论(0) 推荐(0) 编辑

2015年8月12日

摘要: #import #import "Person.h"int main(int argc, const char * argv[]) {// @autoreleasepool {// // Person *p = [[Person alloc] initWithNam... 阅读全文
posted @ 2015-08-12 20:45 不疯不成魔 阅读(222) 评论(0) 推荐(0) 编辑

摘要: #import int codeLineCount(NSString *path){ //1.获得文件管理者 NSFileManager *mgr = [NSFileManager defaultManager]; //判断path是文件夹还是文件路径 BOOL dir ... 阅读全文
posted @ 2015-08-12 20:09 不疯不成魔 阅读(722) 评论(0) 推荐(0) 编辑

摘要: main.mStudent *stu = [Student studentWithName:@"xiaomin" gender:@"man" age:118]; [stu study]; [stu playGame];NSString+SayHi.h@interface ... 阅读全文
posted @ 2015-08-12 11:17 不疯不成魔 阅读(259) 评论(0) 推荐(0) 编辑

摘要: struct student{ char name[20]; char gender;};typedef struct student Student;int main(int argc, const char * argv[]) { @autoreleasepool { ... 阅读全文
posted @ 2015-08-12 11:12 不疯不成魔 阅读(187) 评论(0) 推荐(0) 编辑

摘要: main.m // NSArray *array =@[@"aa",@"ee",@"jj",@"mm",@"ss",@"kk"];// NSLog(@"%@",array);// NSArray *sortArray = [array sortedArrayUsingSelecto... 阅读全文
posted @ 2015-08-12 11:11 不疯不成魔 阅读(352) 评论(0) 推荐(0) 编辑

摘要: // @autoreleasepool { /* API: Inherits from 继承自 Conforms to 遵守什么协议 Framework 属于哪个框架 Availability 什么时候可以用 ... 阅读全文
posted @ 2015-08-12 11:08 不疯不成魔 阅读(215) 评论(0) 推荐(0) 编辑

摘要: @autoreleasepool { /* //创建NSDate 对象,创建的NSDate 对象是零时区的时间 NSDate *currentDate = [NSDate date]; NSLog(@"%@",... 阅读全文
posted @ 2015-08-12 11:07 不疯不成魔 阅读(212) 评论(0) 推荐(0) 编辑

摘要: main.m Person *p = [[Person alloc] init]; [p setName:@"doubi"]; [p setGender:@"man"]; [p setAge:23]; //点语法: //对象.属性名 ... 阅读全文
posted @ 2015-08-12 11:06 不疯不成魔 阅读(399) 评论(0) 推荐(0) 编辑

摘要: main.mMan *laowang = [Man manWithName:@"haohao" gender:@"男" age:0]; laowang.age = 20; Woman *sister = [W... 阅读全文
posted @ 2015-08-12 11:01 不疯不成魔 阅读(190) 评论(0) 推荐(1) 编辑

2015年8月1日

摘要: #import #import @interface Point2D : NSObject{ double _x; // x值 double _y; // y值}// x值的getter和setter- (void)setX:(double)x;- (double)x;// y值的get... 阅读全文
posted @ 2015-08-01 15:29 不疯不成魔 阅读(517) 评论(0) 推荐(0) 编辑