Hi if you got a string which contains comment between some special characters then you can use – (NSString *)stringFilter:(NSString *)targetString { NSScanner *theScanner; NSString *text = nil; theScanner = [NSScanner scannerWithString: targetString]; while ([theScanner isAtEnd] ==… Read more »
HI to change the color of UITextfield placeholder text there are three approaches 1. Override the drawPlaceholderInRect:(CGRect)rect – (void) drawPlaceholderInRect:(CGRect)rect { [[UIColor <your color>] setFill]; [[self placeholder] drawInRect:rect withFont:[UIFont systemFontOfSize:10]]; } 2.Access the private iVar(risky apple might not approve) [self.password setValue:[UIColor colorWithRed:(160/255) green:(97/255) blue:(5/255) alpha:1]forKeyPath:@”_placeholderLabel.textColor”]; 3.Its… Read more »
join this Facebook group and share your problems and knowledge
There is nothing more irritating then the msg( debugger console) that are like this; -[NSFetchedResultsController class]: message sent to deallocated instance <some ddress> In order to track the erros which occur when you access the deallocated instance of an object All you need to do is few changes in environment variables step 1.Go to edit schemes… Read more »
Hi Its really good being able to extract characters from NSstring as characters can be mathematically manipulated …here is the code snippet unichar c[2]; char b; NSRange range={0,2}; [@”a1″ getCharacters:c range:range]; printf(“%c%c”,c[0],c[1]);
Hi as a requirement i was asked to make an PGN parser in XCODE i made this from scratch and it is my original work .though this program is still buggy and it does not perform at professional level but it can still parse and extract no of games in… Read more »
Hi i saw an app made by one of my students and one thing which was missing in his app was a background image behind the table view. as a results when i scrolled the beautiful custom cells white background was visible…. an eye sore…. So here is a tutorial… 1.Take an… Read more »
Recently i was making an NSMutableArray from a string by separating the string by component, Unfortunately it was filling too many empty useless elements into my array…in order to remove them i used following code for (int i=0;i<contentsOfFile.count; i++) { if(!([[contentsOfFile objectAtIndex:i]isEqual:@”n”]||[[contentsOfFile objectAtIndex:i]isEqual:@””]||[[contentsOfFile objectAtIndex:i]isEqual:@”rn”])) … Read more »