Xcode upgrade: PBXContainerItemProxy missing containerPortal key

the project icon which we see i.e project-name.xcodeproj, is actually a directory, you do this 1. in terminal do cd your project.xcodeproj 2.ls 3.vi project.pbxproj 4. scroll down till /* Begin PBXContainerItemProxy section */ 5.there you will see all sections check for the section which is missing a portal key edit it and save it … Read more

iOS6 attributed string usage code snippets

  Fun starts Now   infoString=@”This is an example of Attributed String”; NSMutableAttributedString *attString=[[NSMutableAttributedString alloc] initWithString:infoString]; NSInteger _stringLength=[infoString length]; UIColor *_black=[UIColor blackColor]; UIFont *font=[UIFont fontWithName:@”Helvetica-Bold” size:30.0f]; [attString addAttribute:NSFontAttributeName value:font range:NSMakeRange(0, _stringLength)]; [attString addAttribute:NSForegroundColorAttributeName value:_black range:NSMakeRange(0, _stringLength)]; //——————————————————————————————– UIColor *_red=[UIColor redColor]; UIFont *font=[UIFont fontWithName:@”Helvetica-Bold” size:72.0f]; [attString addAttribute:NSFontAttributeName value:font range:NSMakeRange(0, _stringLength)]; [attString addAttribute:NSStrokeColorAttributeName value:_red range:NSMakeRange(0, _stringLength)]; [attString … Read more

How to change the Alpha Of an image

+ (UIImage *) setImage:(UIImage *)image withAlpha:(CGFloat)alpha{ // Create a pixel buffer in an easy to use format CGImageRef imageRef = [image CGImage]; NSUInteger width = CGImageGetWidth(imageRef); NSUInteger height = CGImageGetHeight(imageRef); CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); UInt8 * m_PixelBuf = malloc(sizeof(UInt8) * height * width * 4); NSUInteger bytesPerPixel = 4; NSUInteger bytesPerRow = bytesPerPixel * width; … Read more

Draw Scalable rectangle in xcode..

Hi all one of my juniors had to make a app in which image cropping was required.The part which required drawing a scalable rectangle on screen was bit tough so here is a simple project…use it where ever u want it ..Happy coding (touch the corner of rectangle and drag it to scale the rectangle) dwnload link:-   … Read more

how to add ParseKit to your project…

HiParsekit is a very powerfull yet simple tokenizer  you can make your own language parser using parse kit.in this post i will tell you how to integrate parsekit to your project.The procee on the parse kit website is for xcode 3. Lets get started Step 1. Take check out of the ParseKit from     svn co http://todparsekit.googlecode.com/svn/trunk … Read more

Change Customize UITextfield placeholder text in XCode

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 not a way but a … Read more