首先是一个库:然后设置一个工具类.h 1 @interface HMFoundLocation : NSObject 2 3 AS_SINGLETON(HMFoundLocation) 4 5 @property(nonatomic,strong)NSString *address; 6 7 ...
分类:
移动开发 时间:
2014-10-24 18:02:48
阅读次数:
240
#include #include - (NSString *)getIPAddress{NSString *address = @"error";structifaddrs *interfaces = NULL;structifaddrs *temp_addr = NULL;intsuccess ...
分类:
移动开发 时间:
2014-10-24 14:26:30
阅读次数:
167
#import - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{ NSString *mediaTy...
分类:
其他好文 时间:
2014-10-24 12:58:38
阅读次数:
310
分类:网络安全/工具使用/文章常用路径工具函数NSString*NSUserName(void)返回当前用户的登录名NSString*NSFullUserName(void)返回当前用户的完整用户名NSString*NSHomeDirectory(void)返回当前用户主目录的路径NSString*...
分类:
其他好文 时间:
2014-10-24 12:53:00
阅读次数:
168
一、使用UIWebView 将web content 嵌入到应用上。API提供了三种方法:- (void)loadRequest:(NSURLRequest *)request;- (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)ba...
分类:
Web程序 时间:
2014-10-24 12:30:55
阅读次数:
202
1 NSArray *paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *path=[paths objectAtIndex:0]; NSSt...
分类:
移动开发 时间:
2014-10-24 12:17:50
阅读次数:
141
NSString *URLTmp = @""; NSString *URLTmp1 = [URLTmp stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; //转码成UTF-8 否则可能会出现错误 URLTmp = U.....
分类:
Web程序 时间:
2014-10-23 22:18:17
阅读次数:
196
NetWorking.h#import<Foundation/Foundation.h>typedefvoid(^FinishBlock)(idresponseObject);@interfaceNetWorking:NSObject@property(nonatomic,strong)FinishBlockfinishBlock;+(void)GetDataWithURL:(NSString*)urlfinshedBlock:(FinishBlock)block;@endNetWorking.m..
分类:
其他好文 时间:
2014-10-23 21:09:07
阅读次数:
287
举一个炒鸡简单的例子:1 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{2 NSString *cellIdentifier = @...
分类:
其他好文 时间:
2014-10-23 20:29:16
阅读次数:
189
例如: NSString *string = @"abavavasdsvx,as.dsf/,.[abcdefghijklmn]dgdfg"; NSRange start = [string rangeOfString:@"["]; NSRange end = [string ra...
分类:
其他好文 时间:
2014-10-23 19:10:39
阅读次数:
124