2017年1月6日
摘要: // 错误存储路径 - (NSString *)dataFilePath{ NSString *dbPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) lastObject]; 阅读全文
posted @ 2017-01-06 17:45 1018475062 阅读(109) 评论(0) 推荐(0)
摘要: // 全局队列 异步下载图片 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { dispatch_async(dispatch_get_global_queue(0, 0), ^{ NSLog(@"%@", [NST 阅读全文
posted @ 2017-01-06 16:43 1018475062 阅读(140) 评论(0) 推荐(0)
摘要: // 获得当前的版本 #define iOS(version) ([UIDevice currentDevice].systemVersion.doubleValue >= (version)) #define ColorA(r, g, b, a) [UIColor colorWithRed:(r) 阅读全文
posted @ 2017-01-06 16:30 1018475062 阅读(271) 评论(0) 推荐(0)
摘要: iOS 客户端固定时间发送经纬度(x,y)到服务器s,服务器存储每个登录用户的经纬度到表t中,表t按照经纬度分表,将地图分成一个个的小格子。当用户点击附近的人时,对用户的(x,y)进行计算,最多一次查询其中的4个格子(子表),计算两点间距离获取结果(有点像桶排序)性能上可以将表t替换为内存结构,容灾 阅读全文
posted @ 2017-01-06 16:29 1018475062 阅读(319) 评论(0) 推荐(0)
摘要: // 计入导航控制器时,要使得底部的TabBar消消失 test.hidesBottomBarWhenPushed = YES; /** * 布局子控件 */ - (void)layoutSubviews { [super layoutSubviews]; // NSClassFromString( 阅读全文
posted @ 2017-01-06 16:27 1018475062 阅读(80) 评论(0) 推荐(0)