摘要:AlertView.h#import @interface AlertView : UIView@property (strong, nonatomic) UILabel *messageLabel;@endAlertView.m#import "AlertView.h"@interface Ale...
阅读全文
摘要:BookStoreCell.h#import @interface BookStoreCell : UITableViewCell@property (strong, nonatomic) UIImageView *bookImageView;@property (strong, nonatomic...
阅读全文
摘要:Core Data是ORM框架,很像.NET框架中的EntityFramework。使用的基本步骤是:在项目属性里引入CoreData.framework (标准库)在项目中新建DataModel (生成*.xcdatamodeld文件)在DataModel里创建Entity为Entity生成头文件...
阅读全文
摘要:NSXMLParser是标准库类Book.xml 金庸 sfdgasidfhasdfb --> hello,world i'm lishujun sdfsdfs\ aaaasdfsdf ...
阅读全文
摘要:定义:@interface ViewController (){ UIActivityIndicatorView *testActivityIndicator;}实例化,开始旋转:-(void) showWaitStatus{ NSLog(@"wait..."); testActi...
阅读全文
摘要:代码:@interface HttpProcessor : NSObject { NSMutableData *buffer;}@property BOOL finished;@property (strong, nonatomic) NSString *html;@end@implement...
阅读全文
摘要:代码:#import void request(NSString *urlString){ NSLog(@"BEGIN"); // make request object NSURL *url = [[NSURL alloc]initWithString:urlString]; ...
阅读全文
摘要:代码:#import void parseJSON(NSString *text){ NSError *error = nil; NSData *data = [text dataUsingEncoding:NSUTF8StringEncoding]; NSArray *array...
阅读全文
摘要:代码:#import "MainViewController.h"@interface MainViewController ()@end@implementation MainViewController- (void)viewDidLoad{ [super viewDidLoad]; ...
阅读全文
摘要:代码:可任选一套方法进行显示和隐藏,如果决定有动画的那套,那么一开始初始化时就必须用set方法进行控制-(void) setBar{ UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemIte...
阅读全文
摘要:代码:-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ //切换方法1 //动画效果:左右滑动 //必须有导航器视图才能切换 [self.navigationController pushView...
阅读全文
摘要:代码:#import "RootViewController.h"@implementation RootViewController@synthesize scrollView;- (void)viewDidLoad{ [super viewDidLoad]; // Do any ad...
阅读全文
摘要:scroll view 例子://// RootViewController.m// testView//// Created by lishujun on 14-9-20.// Copyright (c) 2014年 lishujun. All rights reserved.//#imp...
阅读全文
摘要://// main.m// TestVar2//// Created by lishujun on 14-9-4.// Copyright (c) 2014年 lishujun. All rights reserved.//#import @interface Address : NSObj...
阅读全文
摘要:@interface …@property (原子性,可写性,内存管理) id name;@end原子性: nonatomic, atomic 默认atomic可写性: readwrite, readonly 默认readwrite内存管理: assign, retain, copy 默认as...
阅读全文
摘要:代码:/*属性声明方式说明: ----------------------- 1@interface ...{ id name}@end 这样声明的属性其实可以认为是private属性,因为它只能在方法里通过name引用,外部无法通过“object.name”的方式进行引用 (内部也不能通过s...
阅读全文
摘要:问题:如何区分点的是哪张图片?//// main.m// Hello//// Created by lishujun on 14-8-28.// Copyright (c) 2014年 lishujun. All rights reserved.//#import // 视图控制器对象@in...
阅读全文
摘要:功能:点击列表项,用列表字符串作为参数创建一个新视图,新视图默认可以有一个BACK按钮回到上一个视图//// main.m// Hello//// Created by lishujun on 14-8-28.// Copyright (c) 2014年 lishujun. All righ...
阅读全文
摘要:功能:创建一个列表,用数组填充表格,并支持选择列表行//// main.m// Hello//// Created by lishujun on 14-8-28.// Copyright (c) 2014年 lishujun. All rights reserved.//#import //...
阅读全文
摘要:功能:创建一个列表并填充//// main.m// Hello//// Created by lishujun on 14-8-28.// Copyright (c) 2014年 lishujun. All rights reserved.//#import // 视图控制器对象@inter...
阅读全文