Posts

Showing posts from October, 2012

Predicates

A predicate is a useful object that filters an array. It’s a bit like having a select with a simple where clause in SQL. If you have array in this format NSMutableArray * yourAry ; (         {         category = classic ;         quote = "Frankly, my dear, I don't give a damn." ;         source = "Gone With the Wind" ;     },         {         category = classic ;         quote = "Here's looking at you, kid." ;         source = Casablanca ;     } {         category = modern ;         quote = "I solemnly swear that I am up to no good." ;         source = "Harry Potter and the Prisoner of Azkaban" ;     },         {         category = modern ;         quote = "You like pain? Try wearing a corset." ;         source = "Pirates of the Caribbean" ;     } ) And you want to search all the array which category = classic then we can use  NSPredicate . NSStrin

OS X Lion Is Hiding Your Library Folder

Make the Library Visible Permanently Apple hides the Library folder by setting a file system flag associated with the folder. Any folder on your Mac can have its visibility flag turned on or off; Apple just chose to set the Library folder's visibility flag to the off state. To reset the visibility flag, do the following: Launch Terminal, located at /Applications/Utilities. Enter the following command at the Terminal prompt: chflags nohidden ~/Library Once the command is executed, you can quit Terminal. The Library folder will now be visible in the Finder. Should you ever wish to set the Library folder back to its default hidden state in OS X Lion, simply launch Terminal and issue the following Terminal command: chflags hidden ~/Library Unhide the Library Folder, the Apple Way With either the desktop or a Finder window as the front most application, hold down the option key and select the Go menu. The Library folder will be listed as one of the items in t

ANIMATIONS

1 -> [ viewContent . layer addAnimation :[ self getShakeAnimation ] forKey :@ "transform.scale" ]; - ( CAAnimation *) getShakeAnimation {     CAKeyframeAnimation * animation = [ CAKeyframeAnimation animation ];     animation . values = [ NSArray arrayWithObjects :                         [ NSValue valueWithCATransform3D : CATransform3DMakeRotation ( M_PI_2 , 0.0f , 1.0f , 0.0f )],                         [ NSValue valueWithCATransform3D : CATransform3DMakeRotation ( M_PI , 0.0f , 0.0f , 0.0f )],                         [ NSValue valueWithCATransform3D : CATransform3DMakeRotation ( M_PI * 2 , 0.0f , 1.0f , 0.0f )], nil ];  animation . duration = 0.8f ;  animation . delegate = self ;     return animation ; }   2 ->  animate view from bottom to top -( void )makeAnimation {     CGRect optionsFrame = { 0 , 480 , 320 , 480 };     userNameEmailView.frame = optionsFrame;     [ UIView beginAnimations:nil context:nil];     [ UI