// Here We Deleting Something
NSString *content = @"foo/bar:baz.foo";
NSCharacterSet *deleteString = [NSCharacterSet characterSetWithCharactersInString:@"/:."];
content = [[content componentsSeparatedByCharactersInSet: deleteString] componentsJoinedByString: @""];
NSLog(@"String===>>>%@", content);
// Here We Replace Something
NSString *replaceString = @"This is a Dog";
replaceString = [replaceString stringByReplacingOccurrencesOfString:@"Dog" withString:@"Man"];
NSLog(@"Replace String===>>>%@", replaceString);
iOS (Known as iPhone OS before June 2010) is Apple's mobile operating system. Originally developed for the iPhone, it has since been extended to support other Apple devices such as the iPod touch, iPad and Apple TV.
Monday, 14 November 2011
Friday, 11 November 2011
How To Copying A String
NSMutableString *string1;
NSMutableString *string2;
string1 = [NSMutableString stringWithString: @"This is a string"];
string2 = string1;
NSMutableString *string2;
string1 = [NSMutableString stringWithString: @"This is a string"];
string2 = string1;
How To Append A String Within A String
NSMutableString *string1;
NSMutableString *string2;
string1 = [NSMutableString stringWithString: @"This is a string"];
string2 = string1;
[string2 appendString: @" and it is mine!"];
NSLog (@"string1 = %@", string1);
NSLog (@"string2 = %@", string2);
NSMutableString *string2;
string1 = [NSMutableString stringWithString: @"This is a string"];
string2 = string1;
[string2 appendString: @" and it is mine!"];
NSLog (@"string1 = %@", string1);
NSLog (@"string2 = %@", string2);
How To Print The URl On The UIWebView
NSURL *url =[request URL];
NSString *urlStr =[url absoluteString];
NSLog(@"URL shouldStartLoadWithRequest===>>>%@",urlStr);
NSURL *url =[[webView request]URL];
NSString *urlStr =[url absoluteString];
NSLog(@"webViewDidStartLoad===>>>%@",urlStr);
NSURL *url =[[webView request]URL];
NSString *urlStr =[url absoluteString];
NSLog(@"webViewDidFinishLoad===>>>%@",urlStr);
NSString *urlStr =[url absoluteString];
NSLog(@"URL shouldStartLoadWithRequest===>>>%@",urlStr);
NSURL *url =[[webView request]URL];
NSString *urlStr =[url absoluteString];
NSLog(@"webViewDidStartLoad===>>>%@",urlStr);
NSURL *url =[[webView request]URL];
NSString *urlStr =[url absoluteString];
NSLog(@"webViewDidFinishLoad===>>>%@",urlStr);
How To Find The Current Date
NSDate *date = [NSDate date];
NSDateFormatter *formatter = [[[NSDateFormatter alloc]init]autorelease];
[formatter setDateFormat:@"HH:MM:SS"];
NSString* str =[formatter stringFromDate:date];
NSLog(str);
[timeLable setText:str];
NSDateFormatter *formatter = [[[NSDateFormatter alloc]init]autorelease];
[formatter setDateFormat:@"HH:MM:SS"];
NSString* str =[formatter stringFromDate:date];
NSLog(str);
[timeLable setText:str];
Subscribe to:
Posts (Atom)