-----------黑马程序员
IOS培训、Android培训、Java培训、期待与您交流----------------#import /* NSString:不可变字符串
NSMutableString:可变字符串 URL:资源路径 协议头://路径 file://路径 ftp://路径 */...
分类:
其他好文 时间:
2014-05-09 10:47:28
阅读次数:
337
NSData *jsonContent = [[userInfo
objectForKey:@"acme"] dataUsingEncoding:NSUTF8StringEncoding]; NSDictionary *
jsonDic = nil; NSError *error...
分类:
Web程序 时间:
2014-05-09 04:26:15
阅读次数:
361
-(void)initNewUrl:(NSString *)urlString param:(NSMutableDictionary *)_paramDic{
//拼接参数至URL
NSMutableString *paramsStr = [[NSMutableString alloc] initWithString@“”];
if(_paramDic!=...
分类:
Web程序 时间:
2014-05-09 01:50:21
阅读次数:
322
如下图:
从user_logs表格select出来的数据放在一个可变数组NSMutableArray中,如 user_logs,现在要
把数据一条条转化为Userlog databean,UserLog定义如下:
@interface UserLog : NSObject
@property(strong,nonatomic) NSString * logId;
@property(...
分类:
数据库 时间:
2014-05-09 01:02:22
阅读次数:
373
1 @interface NSString (reverse)2 3 -(NSString *)
reverseString;4 5 @end 1 @implementation NSString (reverse) 2 3 -(NSString *)
reverseString { 4 ...
分类:
其他好文 时间:
2014-05-08 23:54:31
阅读次数:
438
UIButton中设置Titl方法包括以下几种:- (void)setTitle:(NSString
*)title forState:(UIControlState)state; -
(void)setAttributedTitle:(NSAttributedString *)tit...
分类:
移动开发 时间:
2014-05-08 22:49:19
阅读次数:
640
NSString *temp = [textField.text
stringByTrimmingCharactersInSet:[NSCharacterSet
whitespaceCharacterSet]];
//看剩下的字符串的长度是否为零
if ([temp
length]!=0) {
...
}...
分类:
其他好文 时间:
2014-05-08 17:14:15
阅读次数:
502
-(void)createImages
{
// Load the alpha image, which is just the same Ship.png image used in the clipping demo
NSString *imagePath = [[NSBundle mainBundle] pathForResource:@"Ship.png" ofType:n...
分类:
移动开发 时间:
2014-05-08 16:17:52
阅读次数:
401
#import int main(){/* 1.NSRange/CGRange
2.NSPoint/CGPoint 3.NSSize/CGSize 4.NSRect/CGRct *///
NSRange/CGRange(location,length)NSString *str = @"i love...
分类:
其他好文 时间:
2014-05-08 14:51:00
阅读次数:
325
有两种写法可以获取到Documents的路径1.NSString *path =
[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
这种写法不是很严谨2.NSArray *filePath = NSSearchPath....
分类:
移动开发 时间:
2014-05-08 09:28:59
阅读次数:
342