NSString *tempA = @"123";NSString *tempB =
@"456";1,字符串拼接NSString *newString = [NSString
stringWithFormat:@"%@%@",tempA,tempB];2,字符转intint intString =...
分类:
其他好文 时间:
2014-06-16 10:46:44
阅读次数:
170
- (float)tableView:(UITableView *)tableView
heightForRowAtIndexPath:(NSIndexPath *)indexPath{ NSString *str = [_dataArray
objectAtIndex:indexPath.row]...
分类:
移动开发 时间:
2014-06-13 07:20:35
阅读次数:
292
#pragma mark - 版本检测- (void) checkVersion{ //
版本号的key NSString *key = (NSString *)kCFBundleVersionKey; // 从info.plist取版本号
NSString *version = [NSBundle...
分类:
其他好文 时间:
2014-06-12 22:08:54
阅读次数:
283
Byte *bytes=(Byte*)[data bytes]; NSString
*hexStr=@""; for(int i=0;i<[data length];i++) { NSString *newHexStr=[NSString
stringWithFormat:...
分类:
其他好文 时间:
2014-06-12 14:57:09
阅读次数:
204
vcf, 通讯录导出的一种格式。一。生成vcf文件如果要把我们iPhone通讯录里的数据, 生成vcf格式文件。我们可以借助iCloud。 小技巧:通过iCloud导出iPhone通讯录的方法当然, 如果你想在应用中, 利用代码生成, 完全可以。先导出通讯录数据, 再解析, 再生成vcf文件即可。参考下面代码:-(NSString*)generateVCardStringWithContacts...
分类:
移动开发 时间:
2014-06-11 06:11:40
阅读次数:
309
之前写了《Core Data浅谈系列汇总》,今天稍微回顾了下,做些补充。在这个系列的第一篇《基础结构》中(2013年1月份的文章,时间过得好快啊!),有简单带过Entity的Attribute:数据类型、布尔值统一用NSNumber来表示;字符串类型用NSString表示;时间类型用NSDate表示;二进制数据类型用NSData表示;非标准类型用Transformable来表示;而Attribut...
分类:
其他好文 时间:
2014-06-11 00:08:00
阅读次数:
252
1、背景音乐播放 循环播放长音乐 支持mp3格式#import ; 1 NSString
*musicFilePath = [[NSBundle mainBundle] pathForResource:@"changan"
ofType:@"mp3"]; //创建音乐文件路径 2 NSURL *m....
分类:
移动开发 时间:
2014-06-10 21:24:46
阅读次数:
251
首先在工程中加入XXX plist 配置文件。 然后在key 输入名字比如allsdk value
里填写.a 文件的名字NSString *plistPath = [[NSBundle mainBundle]pathForResource:@"Pc_sdk"
ofType:@"plist"]; ....
分类:
移动开发 时间:
2014-06-10 20:05:01
阅读次数:
238
废话不多说,直接上代码:
头文件:
#import
@class NSString;
@interface NSData (Encryption)
- (NSData *)AES256ParmEncryptWithKey:(NSString *)key; //加密
- (NSData *)AES256ParmDecryptWithKey:(NSString *)key; /...
分类:
移动开发 时间:
2014-06-10 07:09:41
阅读次数:
245