This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "TurnPageViewController.h" | |
@implementation TurnPageViewController | |
@synthesize viewArray; | |
@synthesize startPoint; | |
@synthesize currentpageNumber; | |
- (void)viewDidLoad { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSString *)documentPathForFile:(NSString *)fileName | |
{ | |
NSArray *pathArray = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES); | |
NSString *documentPath = [pathArray objectAtIndex:0]; | |
NSString *filePath = [documentPath stringByAppendingPathComponent:fileName]; | |
return filePath; | |
// return [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:fileName]; | |
} | |
- (NSMutableArray *)loadLocalBooksFromDocument:(NSString *)fileName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)getContactList | |
{ | |
ABAddressBookRef addressBook = ABAddressBookCreate(); | |
NSMutableArray *peopleArray = (NSMutableArray *)ABAddressBookCopyArrayOfAllPeople(addressBook); | |
for (id *people in peopleArray) | |
{ | |
// phone | |
ABMultiValueRef phones = (ABMultiValueRef) ABRecordCopyValue(people, kABPersonPhoneProperty); | |
int nCount = ABMultiValueGetCount(phones); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MultilineCellInTableViewViewController.m | |
// MultilineCellInTableView | |
// | |
// Created by Слава on 02.11.09. | |
// Copyright Slava Bushtruk 2009. All rights reserved. | |
// | |
#import "MultilineCellInTableViewViewController.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
localhost:iOS40 terry-wang$ sudo Library/uninstall-devtools --mode=all | |
Password: | |
Use of uninitialized value $dir_name in substitution (s///) at Library/uninstall-devtools line 153. | |
Start time: 2010年12月 2日 星期四 12时14分39秒 CST | |
Started uninstalling versioned non-relocatable developer tools content. | |
Shutting down distcc... | |
Analyzing devtools package: 'com.apple.pkg.VersionedDeveloperToolsSystemSupportLeo'... | |
Analyzing package: 'Adobe Flash Player.pkg'... | |
Analyzing package: 'AirPortUtility.pkg'... | |
Analyzing package: 'AppleIntermediateCodec.pkg'... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; | |
int retVal = UIApplicationMain(argc, argv, nil, @"SampleAppDelegate"); | |
[pool release]; | |
return retVal; | |
CGRect rect = [[UIScreen mainScreen] bounds]; | |
NSLog(@"window: %f,%f,%f,%f",rect.origin.x,rect.origin.y,rect.size.width,rect.size.height); | |
window: 0.000000,0.000000,320.000000,480.000000 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)orientation duration:(NSTimeInterval)duration { | |
CGRect apprect; | |
apprect.origin = CGPointMake(0.0f, 0.0f); | |
if ((orientation == UIInterfaceOrientationLandscapeLeft) || (orientation == UIInterfaceOrientationLandscapeRight)) | |
apprect.size = CGSizeMake(480.0f, 300.0f); | |
else | |
apprect.size = CGSizeMake(320.0f, 460.0f); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
@interface DragView : UIImageView | |
{ | |
CGPoint startLocation; | |
} | |
@end | |
@implementation DragView |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. 将你需要的splash界面的图片,存成Default.png | |
2. 在XXXAppDelegate.m程序中,插入如下代码: | |
- (BOOL)application:(UIApplication *)application | |
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |
//–insert a delay of 5 seconds before the splash screen disappears– | |
[NSThread sleepForTimeInterval:5.0]; | |
// Override point for customization after application launch. | |
// Add the view controller’s view to the window and display. | |
[window addSubview:viewController.view]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# OAuth认证包括以下四步内容 | |
# 1. 获取Request Token | |
# 2. 用户确认授权 | |
# 3. 换取Access Token | |
# 4. 访问受限资源 | |
require 'rubygems' | |
gem 'oauth','0.4.3' | |
require 'oauth' |