Posts

Showing posts with the label Common Categories

NSObject+LocalStorage

//  NSObject+LocalStorage.h //  Created by Avneesh.minocha on 19/05/15. #import typedef NS_ENUM (NSUInteger, kModalType) {     kTypeLogin = 1, }; @interface NSObject (LocalStorage) /**  *  This method is use to save any modal in local storage  *  *  @param type name of modal in a form of enum.  */ - ( void )saveLocally:( kModalType )type; /**  *  This method is use to fetch any modal from local storage  *  *  @param type name of modal in a form of enum.  *  *  @return modal object  */ - ( instancetype )fetchLocally:( kModalType )type; /**  *  This method is use to delete any modal from local storage  *  *  @param type name of modal in a form of enum.  */ -( void )removeAllinLocal:( kModalType )type; @end //NSObject+FFLocalStorage.m //  Created by Avneesh.minocha on 19/05/15. ...

NSStirng+AMCurrency

//return indian Currency Symbol by using UNICODE + ( NSString *)indianCurrencySymbol {     return @"\u20B9" ; } //return US Currency Symbol by using UNICODE + ( NSString  *)USCurrencySymbol {      return   @"\u0024" ; } //return UK Currency Symbol by using UNICODE + ( NSString  *)UKCurrencySymbol {      return   @"\u00A3" ; } //Use this  Unicodes  link to download unicode pdf to add any currency that you need in this category class.

NSString+AMString

// Call this class method to any string instance to get the Application Version number + ( NSString *)applicationVersion { NSDictionary *info = [[ NSBundle mainBundle ] infoDictionary ]; NSString *version = [info objectForKey :( NSString *) kCFBundleVersionKey ]; return version; } // Call this class method to any string instance to the get Application name + ( NSString *)applicationName { NSDictionary *info = [[ NSBundle mainBundle ] infoDictionary ]; NSString *name = [info objectForKey :( NSString *) kCFBundleNameKey ]; return name; } // decode your data into string with  NSUTF8StringEncoding + ( NSString *)getStringFromData:( NSData *)data {     return [[ NSString alloc ] initWithData :data encoding : NSUTF8StringEncoding ];      } // remove any whitespace and newline character comes before and after the actual string - ( NSString *)removeWhiteSpaces { NSString *trimmedString = [ se...

UIImageView+AMImageView

-( void )croplikeaCircle {      CALayer *imageLayer = self . layer ;     [imageLayer setCornerRadius : self . frame . size . width / 2 ];     [imageLayer setBorderWidth : 2 ];     [imageLayer setBorderColor :[ UIColor whiteColor ]. CGColor ];     [imageLayer setMasksToBounds : YES ]; }