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
http://www.getmarkman.com/ |
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
添加解决问题 | |
libiconv.dylib | |
libicucore.A.dylib |
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 *str =@"123(3 24) +8678"; | |
NSString *result = [str stringByReplacingOccurrencesOfString:@"(" withString:@" "]; | |
result = [result stringByReplacingOccurrencesOfString:@")" withString:@" "]; | |
result = [result stringByReplacingOccurrencesOfString:@"+86" withString:@" "]; | |
result = [result stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; | |
result = [result stringByReplacingOccurrencesOfString:@" " withString:@""]; | |
NSLog(@"result:%@",result); |
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)add:(NSString *)data | |
{ | |
[theLock lock]; | |
NSLog(@"%@%d",data,ticketNumber); | |
ticketNumber--; | |
[theLock unlock]; | |
} | |
- (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
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
return YES; | |
} | |
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
NSLog(@"come here"); | |
} |
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
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[[NSURL alloc]initWithString:@"http://pic10.nipic.com/20101103/3970232_071442037843_2.jpg"]]; | |
NSLog(@"path:%@",NSHomeDirectory()); | |
[request setDownloadDestinationPath:[NSHomeDirectory() stringByAppendingPathComponent:@"1.jpg" ]]; | |
request.delegate = self; | |
request.downloadProgressDelegate = self; | |
[request startAsynchronous]; | |
} | |
- (void)setProgress:(float)newProgress | |
{ |
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
Reachability *hostReach = [[Reachability reachabilityWithHostName:@"http://www.baidu.com"] retain]; | |
[hostReach startNotifier]; | |
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(reachabilityChanged:) | |
name: kReachabilityChangedNotification object: nil]; | |
- (void) reachabilityChanged: (NSNotification*)note{ |
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
http://stackoverflow.com/questions/7979592/is-it-possible-to-select-the-text-rendered-by-core-text-in-iphone |
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
http://stackoverflow.com/questions/7979592/is-it-possible-to-select-the-text-rendered-by-core-text-in-iphone |
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
btn.titleLable.frame = CGRectMack(20,43,54,45) 无效 | |
[btn setTitleEdgeInsets:UIEdgeInsetsMake(0, a.origin.x +5,0,0)]; 有用 |