NSBundle+TZImagePicker.m 930 B

12345678910111213141516171819202122232425262728293031
  1. //
  2. // NSBundle+TZImagePicker.m
  3. // TZImagePickerController
  4. //
  5. // Created by 谭真 on 16/08/18.
  6. // Copyright © 2016年 谭真. All rights reserved.
  7. //
  8. #import "NSBundle+TZImagePicker.h"
  9. #import "TZImagePickerController.h"
  10. @implementation NSBundle (TZImagePicker)
  11. + (NSBundle *)tz_imagePickerBundle {
  12. NSBundle *bundle = [NSBundle bundleForClass:[TZImagePickerController class]];
  13. NSURL *url = [bundle URLForResource:@"TZImagePickerController" withExtension:@"bundle"];
  14. bundle = [NSBundle bundleWithURL:url];
  15. return bundle;
  16. }
  17. + (NSString *)tz_localizedStringForKey:(NSString *)key {
  18. return [self tz_localizedStringForKey:key value:@""];
  19. }
  20. + (NSString *)tz_localizedStringForKey:(NSString *)key value:(NSString *)value {
  21. NSBundle *bundle = [TZImagePickerConfig sharedInstance].languageBundle;
  22. NSString *value1 = [bundle localizedStringForKey:key value:value table:nil];
  23. return value1;
  24. }
  25. @end