码迷,mamicode.com
首页 >  
搜索关键字:nsstring    ( 4622个结果
iOS 手机号码格式化,344格式
1 @interface ViewController ()2 {3 NSString *previousTextFieldContent;4 UITextRange *previousSelection;5 }6 @end1 - (void)viewDidLoad2 {3 ...
分类:移动开发   时间:2014-11-07 16:49:06    阅读次数:722
日期(NSDate)是NSString类的格式(stringWithFormat)
日期(NSDate)是NSString类的格式(stringWithFormat),也可以改变输出,如果需要输出年代信息等则需要进行转换,等等。NSDate存储的是世界标准时(UTC),输出时需要根据时区转换为本地时间。NSDateFormatter可以比较方便的进行格式转换。01//获取当前日期和...
分类:其他好文   时间:2014-11-07 16:47:20    阅读次数:210
MD5加密
#pragma mark- MD5加密- (NSString *)md5:(NSString *)str{ const char *cStr = [str UTF8String]; unsigned char result[16]; CC_MD5(cStr, strlen(cStr), result...
分类:其他好文   时间:2014-11-07 16:41:18    阅读次数:202
程序内部让用户直接上appstore评价游戏的链接地址以及跳转方法
NSString *str = [NSString stringWithFormat:@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa /wa/viewContentsUserReviews?type=Purple+Software&i...
分类:移动开发   时间:2014-11-07 14:29:06    阅读次数:276
IOKit找不到问题定义
Xcode511下Undefined symbols for architecture armv7s: "_IOMasterPort", referenced from: getValue(NSString*) in ZHPay "_IORegistryGetRootEntry", referenc...
分类:其他好文   时间:2014-11-07 12:52:51    阅读次数:226
Get host name and port(Object-c)
#import #import #import void GetProxyHostNameAndPort((CFStringRef proxyEnableKey, CFStringRef proxyHostNameKey, CFStringRef proxyPortKey, NSString **h...
分类:其他好文   时间:2014-11-06 23:23:29    阅读次数:198
iOS-文字转码
iOS-文字转码 形成搜索链接的时候,把从textField获取的文字转码放入。。 #pragma?mark?转码 ///// -?(NSString*)?changeEncoding?:?(NSString*)?str??//转换成?encoding编码 { if?(str?==?nil?|...
分类:移动开发   时间:2014-11-06 17:55:53    阅读次数:124
富文本NSAttributedString与NSMutableAttributedString
NSAttributedString NSAttributedString用来处理字符串,使在同一字符串内显示出不同属性的字符。(例如:用来处理字符串)总之就是可以设置字符串中指定位置或指定范围内字符的属性。 创建一个NSAttributedString对象 - (instancetype)initWithString:(NSString *)aString   使用字...
分类:其他好文   时间:2014-11-06 17:44:46    阅读次数:254
IOS - UIImage
IOS中对图片的处理 UIImage UIImage 继承于NSObject 下面介绍一下UIImage中的方法 首先是我们最常用的 通过图片的文件名来获取这个图片 + (UIImage *)imageNamed:(NSString *)name //要注意的是这个方法适用于已经导入到工程中的图片 1、+ (UIImage *)imageWithCon...
分类:移动开发   时间:2014-11-06 17:35:38    阅读次数:227
NSString
//将NSData转化为NSString NSString* str = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding];//将NSString 转化为NSData(NSString.h)- ...
分类:其他好文   时间:2014-11-06 16:52:40    阅读次数:179
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!