Search Results

Search found 55 results on 3 pages for 'user262325'.

Page 1/3 | 1 2 3  | Next Page >

  • Can I turn my Mac Mini into a Wi-Fi Hotspot without additional tool

    - by user262325
    Hello everyone I have an app need to test via wifi. I just wonder if there is a way to turn my Mac Mini into a Wi-Fi Hotspot without additional tool. I try to setup airport new network name is"mymacmini'. My iPod Touch also can recognize the network "mymacmini". I set my iPod wifi as "mymacmini" But if I try to connect to Internet, Safari always reports failure and connnection with Wifi. I hope to know if I need purchase a wireless router for MAc Mini or there are something wrong I did above? Thanks interdev

    Read the article

  • monitoring iphone 3g/wifi bandswitch

    - by user262325
    Hello everyone I hope add the function to monitor iphone used 3g/wifi band switch. I know I can do these in my app, but I wonder if there is way to monitor all band switch usage of iPhone? I noticed that there is an app http://itunes.apple.com/ca/app/download-meter-for-wi-fi-gprs/id327227530?mt=8 It claims: Works with any carrier (iPods are supported too!). Requires no login/password to your carrier's site. Does not require Internet connection to get traffic usage statistics (works even in Airplane mode) because it gets information on traffic from the device, not a carrier; this means it won't cost you anything to view current traffic consumed, even while roaming in a location where traffic is very expensive. Allows the user to adjust consumed traffic for today or the current month to match traffic amounts reported by your carrier. Stats on the screen are updated every second. Measures traffic in real time with up to byte precision. Separates traffic into incoming and outgoing, Wi-Fi traffic and mobile Internet traffic. It looks like it gets the band switch info from carrier site, but they also said it gets info from device. I am really confused. Welcome any comment. Thanks interdev

    Read the article

  • how to generate an event

    - by user262325
    Hello everyone I created a subclass from UIView #import <UIKit/UIKit.h> @interface MeeSelectDropDownView : UIView { UILabel *mainText; UIImage *bgImg; UIImageView *bgView; UIImageView *originView; NSMutableArray *labelArray; int selectedItem; BOOL inSelectTag; float _defaultHeight; } @property (nonatomic , retain) UIImage *bgImg; @property (nonatomic , retain) UIImageView *bgView; @property (nonatomic , retain) NSMutableArray *labelArray; @property (nonatomic , retain) UIImageView *originView; @property (nonatomic , retain) UILabel *mainText; @property (nonatomic , readonly) int selectedItem; - (void) setViewHeight:(float)aheight; -(void) showDropList; -(void) hiddenDropList; -(void) setStringByArray:(NSArray*)array; -(void)hiddenLabels { for(UILabel *aLabel in labelArray){ [aLabel removeFromSuperview]; } } Is it possible to generate an Event from function 'hiddenLabels' to inform and do somethings Thanks interdev

    Read the article

  • cancel a ASIHTTPRequest thread

    - by user262325
    Hello evryone I have some codes to use ASINetworkQueue as multi thread download ASINetworkQueue *networkQueue; [networkQueue setDelegate:self]; [networkQueue setRequestDidFinishSelector:@selector(requestDone:)]; [networkQueue setShowAccurateProgress:true]; NSURL *url = [NSURL URLWithString:s]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; [request setDownloadProgressDelegate:a]; [request setTag:index]; [request setTimeOutSeconds:10]; [request setDelegate:self]; [networkQueue addOperation:request]; [networkQueue go]; if I try to use the code below to cancel the thread with index k [[[networkQueue operations] objectAtIndex:k] cancel]; I notice all requests in ASINetworkQueue were cancelled and stop working. Welcome any comment Thanks interdev

    Read the article

  • ASIHTTP: multi threads and multi UIPorgressView

    - by user262325
    Hello everyone I have a project to download multi files (fileurl). It display the each thread on a UITableView. In UITableView - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSInteger row=[indexPath row]; NSInteger section=[indexPath section]; //UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:@"any-cell"]; static NSString *SimpleTableIdentifier1 = @"SimpleTableIdentifier1"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier: SimpleTableIdentifier1]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier: SimpleTableIdentifier1] autorelease]; } UIProgressView *aUIProgressView; aUIProgressView =[[UIProgressView alloc] initWithFrame:CGRectMake( 10.9f,48.0f,300.0f,28.0f)]; [aUIProgressView setTag:row]; [aUIProgressView setProgress:0]; [cell addSubview:aUIProgressView]; [self startADownloadThread : [[downloadArray objectAtIndex:row] getURL] progressview:switchView ]; [aUIProgressView release]; [cell setText: [[downloadArray objectAtIndex:row] getURL]]; return cell; } It calls 'startADownloadThread' - (IBAction)startADownloadThread:(NSString *)fileurl progressview:(UIProgressView *)a { [a setProgress:0]; NSLog(@"Value: %f", [a progress]); [networkQueue cancelAllOperations]; [networkQueue setDownloadProgressDelegate:a]; [networkQueue setDelegate:self]; [networkQueue setRequestDidFinishSelector:@selector(requestDone:)]; [networkQueue setShowAccurateProgress:true]; NSURL *url = [NSURL URLWithString:fileurl]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; [request setDelegate:self]; [networkQueue addOperation:request]; [networkQueue go]; } I hope each aUIProgressView display the download progress of each download thread. The above source codes : Display the aUIProgressView list correctly, but only the last aUIProgressView link to a thread display the correct progress, others' value are 0 Welcome any comment Thanks interdev

    Read the article

  • function to get the file name of an URL

    - by user262325
    Hello everyone I have some source code to get the file name of an url for example: http://www.google.com/a.pdf I hope to get a.pdf because the way to join 2 NSStrings I can get is 'appendString' which only for adding a string at right side, so I planned to check each char one by one from the right side of string 'http://www.google.com/a.pdf', when it reach at the char '/', stop the checking, return string fdp.a , after that I change fdp.a to a.pdf source codes are below -(NSMutableString *) getSubStringAfterH : originalString:(NSString *)s0 { NSInteger i,l; l=[s0 length]; NSMutableString *h=[[NSMutableString alloc] init]; NSMutableString *ttt=[[NSMutableString alloc] init ]; for(i=l-1;i>=0;i--) //check each char one by one from the right side of string 'http://www.google.com/a.pdf', when it reach at the char '/', stop { ttt=[s0 substringWithRange:NSMakeRange(i, 1)]; if([ttt isEqualToString:@"/"]) { break; } else { [h appendString:ttt]; } } [ttt release]; //below are to change the sequence of char in h // txt.edcba -> abcde.txt NSMutableString *h1=[[[NSMutableString alloc] initWithFormat:@""] autorelease]; for (i=[h length]-1;i>=0;i--) { NSMutableString *t1=[[NSMutableString alloc] init ]; t1=[h substringWithRange:NSMakeRange(i, 1)]; [h1 appendString:t1]; [t1 release]; } [h release]; return h1; } h1 can reuturn the coorect string a.pdf, but if it returns to the codes where it was called, after a while system reports 'double free * set a breakpoint in malloc_error_break to debug' I checked a long time and foudn that if I removed the code ttt=[s0 substringWithRange:NSMakeRange(i, 1)]; everything will be Ok (of course getSubStringAfterH can not returns the corrent result I expected.), no error reported. I try to fix the bug a few hours, but still no clue. Welcome any comment Thanks interdev

    Read the article

  • Is ther anyone familiar with Erica Sadun's APIKit(app private api scanner)?

    - by user262325
    Hello everyone I'm trying to use APIKit to scan my codes to detect if there is private API. apiscanner should run as ./apiscanner ~/Desktop/MyPath/myapp.app I used command 'cd' go to the directory where apiscanner is. But if I call ./apiscanner ~/Desktop/MyPath/MyApp.app on terminal it reports Last login: Sun Jun 13 07:22:07 on ttys002 unknown required load command 0x80000022 Trace/BPT trap logout Even if I copy the files apiscanner and doit to MyPath, then execute, I get the same problem. I think there is something wrong when I run apiscanner under Mac OS X. Welcome any comment Thanks

    Read the article

  • UIWebView loading progress and adjust web page to fit the view page?

    - by user262325
    Hello everyone I am using UIWebView to load a web page. There are 2 questions: 1.It it possible to track the percentage progress when UIWebView is loading the page? 2.I know there is property scalesPageToFit scalesPageToFit A Boolean value determining whether the webpage scales to fit the view and the user can change the scale. I try to set it to YES, but it looks like that it is not in public API and my app stopped with black screen, I am not sure what is wrong? Welcome any comment Thanks interdev

    Read the article

  • strange problem when placing UILabels on UITableView and calling reloadData

    - by user262325
    Hello everyone I hope to list all files in a directory to an UITableView atableview There are files in Document directory a.txt b.txt F (folder) c.txt in folder F, there are 2 files M.exe N.exe When I change to folder F, it should display on atableview M.exe N.exe but Result is in F, it displayed b.txt F the codes are shown as below -(void) removeACell:(NSInteger)row; { NSUInteger _lastSection = 0;//[self numberOfSectionsInTableView:atableview]; NSUInteger _lastRow =row;// [atableview numberOfRowsInSection:_lastSection] - 1; NSUInteger _path[2] = {_lastSection, _lastRow}; NSIndexPath *_indexPath = [[NSIndexPath alloc] initWithIndexes:_path length:2]; NSArray *_indexPaths = [[NSArray alloc] initWithObjects:_indexPath, nil]; [_indexPath release]; [atableview deleteRowsAtIndexPaths:_indexPaths withRowAnimation:UITableViewRowAnimationBottom]; [_indexPaths release]; } -(void) reloadDirectory { if([fileArray count]>0) { NSInteger n=fileArray.count; for(int i=n-1;i>=0;i--) { [fileArray removeObjectAtIndex: i]; [self removeACell:i]; } } NSFileManager *manager = [NSFileManager defaultManager]; NSLog(@"*******************" ); NSLog(@"ffff%@",[self appDelegate].gCurrentPath_AppDelegate); for(NSString *path in [manager contentsOfDirectoryAtPath:[self appDelegate].gCurrentPath_AppDelegate error:nil]) { NSDictionary *modData= [manager attributesOfItemAtPath: [appDelegate.gCurrentPath_AppDelegate //directory of files stringByAppendingPathComponent:path ] error:nil ]; NSDate * dateModified=(NSDate *) [modData objectForKey:NSFileModificationDate]; NSNumber *fileSize=[modData objectForKey:NSFileSize] ; if(dateModified) { FileObj *newobj=[[FileObj alloc] init ]; [ newobj seta:1]; NSString *ss=[[NSString alloc] initWithFormat:@"%@",path] ; [newobj setfileName:ss]; NSLog(@"---------------%@",ss); BOOL isDir; [manager fileExistsAtPath:[appDelegate.gCurrentPath_AppDelegate stringByAppendingPathComponent:path ] isDirectory:&isDir]; [newobj setisDirectory: isDir ]; [newobj setfilePath:@"1"]; NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setDateFormat:@"EEE MMM dd HH:mm:ss zzz yyyy"]; NSString *stringFromDate =[[NSString alloc] initWithString: [formatter stringFromDate:dateModified]]; [newobj setfileDate:stringFromDate]; [formatter release]; NSString * fileSize1= [[NSString alloc] initWithFormat:@"%d",[fileSize integerValue] ]; [newobj setfileSize: fileSize1]; [ fileArray addObject:newobj]; [newobj release]; }; [atableview reloadData]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSInteger row=[indexPath row]; NSInteger section=[indexPath section]; static NSString *SimpleTableIdentifier1 = @"CellTableIdentifier"; UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier: SimpleTableIdentifier1 ]; int newRow = [indexPath row]; selectIndex=newRow; if(cell==nil) { //**breakpoint AAA here** CGRect cellframe=CGRectMake(0, 0, 300, 60); cell=[[[UITableViewCell alloc] initWithFrame:cellframe reuseIdentifier:SimpleTableIdentifier1] autorelease]; if ([[fileArray objectAtIndex:row] getisDirectory]) { UIImage *image = [UIImage imageNamed:@"folder.png"]; cell.imageView.image = image; } else { UIImage *image = [UIImage imageNamed:@"files.png"]; cell.imageView.image = image; } cell.accessoryType=UITableViewCellAccessoryDetailDisclosureButton; ///-------------------------------------------------------- UILabel *b1 =[ [UILabel alloc]init]; b1.frame = CGRectMake(40.9f,8.0f,250.0f,20.0f) ; [b1 setBackgroundColor:[UIColor clearColor]]; [b1 setTag:(row+15000)]; //------------------------------------------------------- UILabel *b2 =[ [UILabel alloc]init]; b2.frame = CGRectMake(40.9f,30.0f,250.0f,13.0f) ; [b2 setBackgroundColor:[UIColor clearColor]]; [b2 setTag:row+16000]; [b2 setFont:[UIFont systemFontOfSize:10.0]]; //------------------------------------------------ UILabel *b3 =[ [UILabel alloc]init]; b3.frame = CGRectMake(40.9f,45.0f,250.0f,13.0f) ; [b3 setBackgroundColor:[UIColor clearColor]]; [b3 setFont:[UIFont systemFontOfSize:10.0]]; [b3 setTag:row+17000]; [cell.contentView addSubview:b1]; [cell.contentView addSubview:b2]; [cell.contentView addSubview:b3]; [b1 release]; [b2 release]; [b3 release]; }; if([fileArray count]>0) //check if fileArray is correct { NSLog(@"___________________" ); for (int i=0;i<[fileArray count];i++) { NSLog(@"->%@",[[fileArray objectAtIndex:i] getfileName] ); } } UILabel *tem1UILabel=(UILabel*)[cell.contentView viewWithTag:row+15000]; NSString *s1=[[NSString alloc] initWithFormat: [[fileArray objectAtIndex:row] getfileName] ]; NSLog(@"--->%@",s1 ); tem1UILabel.text=s1; [s1 release]; UILabel *tem2UILabel=(UILabel*)[cell.contentView viewWithTag:row+16000]; NSString *s2=[[NSString alloc] initWithFormat: [[fileArray objectAtIndex:row] getfileDate] ]; tem2UILabel.text=s2; [s2 release]; UILabel *tem3UILabel=(UILabel*)[cell.contentView viewWithTag:row+17000]; NSString *s3=[[NSString alloc] initWithFormat: [[fileArray objectAtIndex:row] getfileSize]]; tem3UILabel.text=s3; [s3 release]; return cell; } I set the breakpoint at AAA and found that when I loaded folder F, my application did stop at the breakpoint. But I have removed all cells in atableview before call 'reloadData'. I checked the content of fileArray which is the data source of atableview and found that everything is correct except the display on atableview. Welcome any comment. Thanks interdev

    Read the article

  • SCNetworkReachability compiling error

    - by user262325
    Hello everyone I try to compile Ercia Sadun's sample codes at: http://github.com/erica/iphone-3.0-cookbook-/tree/master/C13-Networking/14-Web%20Browser/ There is error report : warning: in /Users/interdev/iphone source code/Web Browser/Classes/SystemConfiguration.framework/SystemConfiguration, missing required architecture i386 in file Undefined symbols: "_SCNetworkReachabilityScheduleWithRunLoop", referenced from: +[UIDevice(Reachability) scheduleReachabilityWatcher:] in UIDevice-Reachability.o "_SCNetworkReachabilityCreateWithAddress", referenced from: +[UIDevice(Reachability) hostAvailable:] in UIDevice-Reachability.o +[UIDevice(Reachability) pingReachabilityInternal] in UIDevice-Reachability.o "_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from: +[UIDevice(Reachability) unscheduleReachabilityWatcher] in UIDevice-Reachability.o "_SCNetworkReachabilitySetCallback", referenced from: +[UIDevice(Reachability) scheduleReachabilityWatcher:] in UIDevice-Reachability.o +[UIDevice(Reachability) scheduleReachabilityWatcher:] in UIDevice-Reachability.o +[UIDevice(Reachability) unscheduleReachabilityWatcher] in UIDevice-Reachability.o "_SCNetworkReachabilityGetFlags", referenced from: +[UIDevice(Reachability) hostAvailable:] in UIDevice-Reachability.o +[UIDevice(Reachability) pingReachabilityInternal] in UIDevice-Reachability.o ld: symbol(s) not found collect2: ld returned 1 exit status "_SCNetworkReachabilityScheduleWithRunLoop", referenced from: +[UIDevice(Reachability) scheduleReachabilityWatcher:] in UIDevice-Reachability.o "_SCNetworkReachabilityCreateWithAddress", referenced from: +[UIDevice(Reachability) hostAvailable:] in UIDevice-Reachability.o +[UIDevice(Reachability) pingReachabilityInternal] in UIDevice-Reachability.o "_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from: +[UIDevice(Reachability) unscheduleReachabilityWatcher] in UIDevice-Reachability.o "_SCNetworkReachabilitySetCallback", referenced from: +[UIDevice(Reachability) scheduleReachabilityWatcher:] in UIDevice-Reachability.o +[UIDevice(Reachability) scheduleReachabilityWatcher:] in UIDevice-Reachability.o +[UIDevice(Reachability) unscheduleReachabilityWatcher] in UIDevice-Reachability.o "_SCNetworkReachabilityGetFlags", referenced from: +[UIDevice(Reachability) hostAvailable:] in UIDevice-Reachability.o +[UIDevice(Reachability) pingReachabilityInternal] in UIDevice-Reachability.o ld: symbol(s) not found collect2: ld returned 1 exit status Build failed (5 errors) even I add systemConfiguration.framework, it reported same error. Welcome any comment Thanks interdev

    Read the article

  • remove an ASIHTTPRequest thread when it is done

    - by user262325
    Hello everyone I have a project in which it runs 5 download threads - (void)fetchThisURLFiveTimes:(NSURL *)url { [myProgressIndicator setProgress:0]; NSLog(@"Value: %f", [myProgressIndicator progress]); [myQueue cancelAllOperations]; [myQueue setDownloadProgressDelegate:myProgressIndicator]; [myQueue setDelegate:self]; [myQueue setRequestDidFinishSelector:@selector(queueComplete:)]; int i; for (i=0; i<5; i++) { ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; [request setDidFinishSelector:@selector(requestDone:)]; [request setDelegate:self]; [myQueue addOperation:request]; } [myQueue go]; } - (void)requestWentDone:(ASIHTTPRequest *)request { //.. } - (void)queueComplete:(ASINetworkQueue *)queue { NSLog(@"Value: %f", [myProgressIndicator progress]); } I hope to remove a thread when it is done. I do not know where I need to place my codes: requestWentDone:(ASIHTTPRequest *)request or queueComplete:(ASINetworkQueue *)queue I noticed there is no tag property for request, so I added it to ASIHTTPRequest to help me recognize which thread prompts the function reuqestWentDone, I can get the tag of different request, but I do not know how to remove the ASIHTTPRequest thread from myQueue. Welcome any comment Thanks interdev

    Read the article

  • regular expression to read the string between <title> and </title>

    - by user262325
    Hello every one I hope to read the contents between and in a html string. I think it should be in objective-c @"<title([\\s\\S]*)</title>" below are the codes that rewrited for regular expression //source of NSStringCategory.h #import <Foundation/Foundation.h> #import <regex.h> @interface NSStringCategory:NSObject { regex_t preg; } -(id)initWithPattern:(NSString *)pattern options:(int)options; -(void)dealloc; -(BOOL)matchesString:(NSString *)string; -(NSString *)matchedSubstringOfString:(NSString *)string; -(NSArray *)capturedSubstringsOfString:(NSString *)string; +(NSStringCategory *)regexWithPattern:(NSString *)pattern options:(int)options; +(NSStringCategory *)regexWithPattern:(NSString *)pattern; +(NSString *)null; +(void)initialize; @end @interface NSString (NSStringCategory) -(BOOL)matchedByPattern:(NSString *)pattern options:(int)options; -(BOOL)matchedByPattern:(NSString *)pattern; -(NSString *)substringMatchedByPattern:(NSString *)pattern options:(int)options; -(NSString *)substringMatchedByPattern:(NSString *)pattern; -(NSArray *)substringsCapturedByPattern:(NSString *)pattern options:(int)options; -(NSArray *)substringsCapturedByPattern:(NSString *)pattern; -(NSString *)escapedPattern; @end and .m file #import "NSStringCategory.h" static NSString *nullstring=nil; @implementation NSStringCategory -(id)initWithPattern:(NSString *)pattern options:(int)options { if(self=[super init]) { int err=regcomp(&preg,[pattern UTF8String],options|REG_EXTENDED); if(err) { char errbuf[256]; regerror(err,&preg,errbuf,sizeof(errbuf)); [NSException raise:@"CSRegexException" format:@"Could not compile regex \"%@\": %s",pattern,errbuf]; } } return self; } -(void)dealloc { regfree(&preg); [super dealloc]; } -(BOOL)matchesString:(NSString *)string { if(regexec(&preg,[string UTF8String],0,NULL,0)==0) return YES; return NO; } -(NSString *)matchedSubstringOfString:(NSString *)string { const char *cstr=[string UTF8String]; regmatch_t match; if(regexec(&preg,cstr,1,&match,0)==0) { return [[[NSString alloc] initWithBytes:cstr+match.rm_so length:match.rm_eo-match.rm_so encoding:NSUTF8StringEncoding] autorelease]; } return nil; } -(NSArray *)capturedSubstringsOfString:(NSString *)string { const char *cstr=[string UTF8String]; int num=preg.re_nsub+1; regmatch_t *matches=calloc(sizeof(regmatch_t),num); if(regexec(&preg,cstr,num,matches,0)==0) { NSMutableArray *array=[NSMutableArray arrayWithCapacity:num]; int i; for(i=0;i<num;i++) { NSString *str; if(matches[i].rm_so==-1&&matches[i].rm_eo==-1) str=nullstring; else str=[[[NSString alloc] initWithBytes:cstr+matches[i].rm_so length:matches[i].rm_eo-matches[i].rm_so encoding:NSUTF8StringEncoding] autorelease]; [array addObject:str]; } free(matches); return [NSArray arrayWithArray:array]; } free(matches); return nil; } +(NSStringCategory *)regexWithPattern:(NSString *)pattern options:(int)options { return [[[NSStringCategory alloc] initWithPattern:pattern options:options] autorelease]; } +(NSStringCategory *)regexWithPattern:(NSString *)pattern { return [[[NSStringCategory alloc] initWithPattern:pattern options:0] autorelease]; } +(NSString *)null { return nullstring; } +(void)initialize { if(!nullstring) nullstring=[[NSString alloc] initWithString:@""]; } @end @implementation NSString (NSStringCategory) -(BOOL)matchedByPattern:(NSString *)pattern options:(int)options { NSStringCategory *re=[NSStringCategory regexWithPattern:pattern options:options|REG_NOSUB]; return [re matchesString:self]; } -(BOOL)matchedByPattern:(NSString *)pattern { return [self matchedByPattern:pattern options:0]; } -(NSString *)substringMatchedByPattern:(NSString *)pattern options:(int)options { NSStringCategory *re=[NSStringCategory regexWithPattern:pattern options:options]; return [re matchedSubstringOfString:self]; } -(NSString *)substringMatchedByPattern:(NSString *)pattern { return [self substringMatchedByPattern:pattern options:0]; } -(NSArray *)substringsCapturedByPattern:(NSString *)pattern options:(int)options { NSStringCategory *re=[NSStringCategory regexWithPattern:pattern options:options]; return [re capturedSubstringsOfString:self]; } -(NSArray *)substringsCapturedByPattern:(NSString *)pattern { return [self substringsCapturedByPattern:pattern options:0]; } -(NSString *)escapedPattern { int len=[self length]; NSMutableString *escaped=[NSMutableString stringWithCapacity:len]; for(int i=0;i<len;i++) { unichar c=[self characterAtIndex:i]; if(c=='^'||c=='.'||c=='['||c=='$'||c=='('||c==')' ||c=='|'||c=='*'||c=='+'||c=='?'||c=='{'||c=='\\') [escaped appendFormat:@"\\%C",c]; else [escaped appendFormat:@"%C",c]; } return [NSString stringWithString:escaped]; } @end I use the codes below to get the string between "" and "" NSStringCategory *a=[[NSStringCategory alloc] initWithPattern:@"<title([\s\S]*)</title>" options:0];// Unfortunately [a matchedSubstringOfString:response]] always returns nil I do not if the regular expression is wrong or any other reason. Welcome any comment Thanks interdev

    Read the article

  • NSNotificationCenter and ASIHTTPRequest

    - by user262325
    Hello everyone: I hope to get the http header info(file size) in asynchronous mode. So I initialize as codes: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(processReadResponseHeaders:) name:@"readResponseHeaders" object:nil]; my codes to read the http header -(void)processReadResponseHeaders: (ASIHTTPRequest *)request ;//(id)sender; { unsigned long long contentLength = [request contentLength]; //error occurs here } It has to change the source code of ASIHTTPRequest.m I did add my codes in function readResponseHeaders to notify the event is triggered ) - (void)readResponseHeaders { //......................... [[NSNotificationCenter defaultCenter] postNotificationName:@"readResponseHeaders" object:self];// } the log file reports: 2010-05-15 13:47:38.034 myapp[2187:6a63] * -[NSConcreteNotification contentLength]: unrecognized selector sent to instance 0x46e5bb0 Welcome any comment Thanks interdev

    Read the article

  • can not set the bool value of app setting

    - by user262325
    Hello everyone I use the codes below to read and write a bool value from my application: -(void)SaveAppSetting; {     NSUserDefaults *defaults=[NSUserDefaults standardUserDefaults];     bool b=true;     [defaults setBool:b forKey:@"AnyKey"]; [defaults synchronize]; } -(void)LoadAppSetting; {     NSUserDefaults *defaults=[NSUserDefaults standardUserDefaults];     bool b=[defaults boolForKey: @"AnyKey"] ; } I found that "LoadAppSetting" worked well, it could get the correct value of item with key "AnyKey". The function "SaveAppSetting" looked like no function, it reported no error, but it can not change value of the item with key "AnyKey". "AnyKey" setting in Setting bundle is item Dictionary Type String PSToggleSwitchSpecifier Title String AnyKey's Title Key String AnyKey DefaultValue Boolean Checked Is there any person met the same problem? Thanks interdev

    Read the article

  • how to get the http header in asynchronous request mode using ASIHHTTP

    - by user262325
    Hello everyone I hope to display the download file size by reading http header. I know there is way do this: ASIHTTPRequest request = [ASIHTTPRequest requestWithURL:url]; [request startSynchronous]; NSString poweredBy = [[request responseHeaders] objectForKey:@"X-Powered-By"]; NSString *contentType = [[request responseHeaders] objectForKey:@"Content-Type"]; but this is Synchronous mode, in Asynchronous mode it can be done as below: (void)requestFinished:(ASIHTTPRequest *)request { unsigned long long contentLength = [request contentLength]; } but 'requestFinished' is at the end of download. Is there an event to get the http header info at the beginning of download? Thank interdev

    Read the article

  • :-( A valid signing identity matching this profile could not be found in your keychain

    - by user262325
    Hello everyone I hope to test my app on iPod Touch I created development provisioning profile. I dragged downloaded .mobileprovision file to Organizer There is a yellow triangle warned that "A valid signing identity matching this profile could not be found in your keychain" The others distribution provisioning profiles have no any problem. I checked my connected iPod Touch. Organizer also said that: OS Installed on "interdev"'s iPod 3.1.3 (7E18) Xcode Supported iPhone OS Versions 3.1.1 (7C146) 3.1.1 (7C145) 3.1 (7C144) 3.0.1 (7A400) 3.0 2.2.1 2.2 2.1.1 2.1 2.0.2 (5C1) 2.0.1 (5B108) 2.0 (5A347) 2.0 (5A345) ipod os 3.1.3 xocde 3.1 Do I need to upgrade Xcode? Thanks interdev

    Read the article

  • remove ViewController from memory

    - by user262325
    hello everyone I hope to load an ViewController and do something then unload it from memory. if (self.vViewController5.view.superview==nil) { ViewController5 *blueController = [[ViewController5 alloc] initWithNibName:@"View5" bundle:nil]; self.vViewController5 = blueController; [self.vViewController5 setDelegate:self]; [blueController release]; } [self presentModalViewController:vViewController5 animated:YES]; later, call [self dismissModalViewControllerAnimated:YES]; but I found that dismissModalViewControllerAnimated does not trigger the event viewDidUnload of Viewcontroller5. I try function release but it caused program collapse. I also try removeFromSuperView but it does not trigger the event ViewDidUnload neither. Welcome any comment Thanks interdev

    Read the article

  • cancel an ASIHTTPRequest thread

    - by user262325
    Hello evryone I have some codes to use ASINetworkQueue as multi thread download ASINetworkQueue *networkQueue; NSURL *url = [NSURL URLWithString:s]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; [networkQueue addOperation:request]; [networkQueue go]; if I try to use the code below to cancel the thread with index k [[[networkQueue operations] objectAtIndex:k] cancel]; I notice all requests in ASINetworkQueue were cancelled and stop working. Welcome any comment Thanks interdev

    Read the article

  • ASIHTTP: addOperation when other threads are running

    - by user262325
    Hello everyone I have a project using ASIHTTP to multi download files from a site when I add a new request: [networkQueue cancelAllOperations]; [networkQueue setDownloadProgressDelegate:a]; [networkQueue setDelegate:self]; [networkQueue setRequestDidFinishSelector:@selector(requestDone:)]; NSURL *url = [NSURL URLWithString:@"http://www.google.com"]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; [request setDelegate:self]; [request startAsynchronous]; [networkQueue addOperation:request]; [networkQueue go]; it reported: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[ASINetworkQueue addOperation:]: operation is executing and cannot be enqueued' It looks like I can not add a new request when others are running. Welcome any comment Thanks interdev

    Read the article

  • position of UITabbar

    - by user262325
    Hello everyone I try to place UITabbar on iPhone window using CGRectMake. But I found that the Y position is different from the display in Interface Builder. Is there anyone met the same problem? Using CGRectMake to locate the x,y position, is it possible cause the refusing from App stoe due to compatible reason? Thanks interdev

    Read the article

  • read past bandswitch

    - by user262325
    Hello everyone I know there is no public api to read 3g/wifi bandswitch. But I wonder how this app can do this? http://itunes.apple.com/ca/app/download-meter-for-wi-fi-gprs/id327227530?mt=8 Thanks interdev

    Read the article

1 2 3  | Next Page >