NSString *executableFile = [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleExecutableKey];NSString *version = [[[NSBundle ma...
分类:
移动开发 时间:
2015-07-11 21:23:47
阅读次数:
138
1.xib的基础知识:1).xib = nib;2).xib的加载:[[NSBundle mainBundle] loadNibName:@"rowView" ower:nil options:nil];2.xib 和storyboard 的异同:1>.不同*storyboard:描述软件界面,大范...
分类:
移动开发 时间:
2015-07-11 11:49:25
阅读次数:
140
首先列出几个简单的信息#pragma makr- app版本-(NSString *)getVersionCode{ NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; return [infoDic...
分类:
移动开发 时间:
2015-07-10 14:54:20
阅读次数:
126
知识要点 1. xib最终会变成nib文件2. NSBundle实例方法 - (NSString *)pathForResource:(NSString *)name ofType:(NSString *)ext; 如果bundle中不存在某个文件,则返回的path为nil,如果存在 则会返回该文....
分类:
移动开发 时间:
2015-07-09 19:34:00
阅读次数:
1769
在Objective-C里其实也可以运行AppleScript
第一种方式是Source 将脚本写到变量字符串里
NSAppleEventDescriptor *eventDescriptor = nil;
NSAppleScript *script = nil;
NSBundle *bunlde = [NSBundle mainBundle];
NSStrin...
分类:
移动开发 时间:
2015-07-09 16:08:44
阅读次数:
260
// app名称 ? ? NSString *app_Name1 = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]; ?? ? ? ? NSString *app_Name = [NSString stringWithFormat:@"%@",[[NSBu...
分类:
移动开发 时间:
2015-07-08 11:14:08
阅读次数:
148
1。NSString *path = [[NSBundle mainBundle] pathForResource:@"文件名"ofType:@"plist"];// 文件数据类型是arrayNSArray *array=[NSArray arrayWithContentsOfFile:path];...
分类:
移动开发 时间:
2015-07-08 00:06:48
阅读次数:
162
描述:当一个App嵌入一个SDK时,在SDK的调用方法中加判断 NSString *identifier = [[NSBundle mainBundle] bundleIdentifier]; if (!identifier || identifier.length == 0 || [identif...
分类:
移动开发 时间:
2015-07-07 16:40:49
阅读次数:
100
1.播放短声音 SystemSoundID shake_sound_male_id = 0; NSString *thesoundFilePath = [[NSBundle mainBundle] pathForResource:@"ReceivedMessage" ofType:@"...
分类:
移动开发 时间:
2015-07-06 21:31:19
阅读次数:
129
1.iOS获取当前app的名称和版本号NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];CFShow(infoDictionary);// app名称NSString *app_Name = [infoDict...
分类:
移动开发 时间:
2015-07-06 15:48:18
阅读次数:
168