共 12 篇文章
显示摘要每页显示  条
百度地图 删除 覆盖物 removeOverlay removeOverlays
结论过渡:如果对象收到alloc消息只在虚拟内存分配空间,那么persistent bytes(堆)里是不会分配给XOModel大小的,也就是说这里的persistent bytes大小应该是0。++i) { // 修改处 XOModel *model = [XOModel alloc]; // 注意这句只有alloc [self.array addObject:model]; }}When allocating any small blocks of memory, remem...
iOS 9 NEHotspotHelper 的NetworkExtension使用。+ (BOOL)registerWithOptions:(NSDictionary*)options queue:(dispatch_queue_t)queue handler:(NEHotspotHelperHandler)handler.BOOL returnType = [NEHotspotHelper registerWithOptions:options queue:queue handler: ^(NEHotspotHelperCommand * cmd) {NSLog(@"cmd %@", cmd);NSL...
我采用了UITextField作为我的输入框控件,并且在委托方法:-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)rangereplacementString:(NSString *)string中实现了对字符串的长度限制,实现如下:#define kMaxLength20-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)ran...
NSDate NSCalendar(日历立法) NSDateComponents(日期组件)的一些用法。NSDateComponents *comps = [[NSDateComponents alloc] init];NSCalendar *gregorian = [[NSCalendar alloc]NSDate* startDate = [ [ NSDate alloc] init ];NSDateComponents *cps = [chineseClendar components:unitFlags fromDate:startDate toDate:toDate options:0...
a 主线程的runloop自动创建,子线程的runloop默认不创建(在子线程中调用NSRunLoop *runloop = [NSRunLoop currentRunLoop];获取RunLoop对象的时候,就会创建RunLoop);Runloop有两个关键判断点,一个是通过msg决定Runloop是否等待,一个是通过判断退出条件来决定Runloop是否循环。常驻子线程,保持子线程一直处理事件为了保证线程长期运转,...
iOS 3D Touch (UIApplicationShortcutItem、UIViewControllerPreviewing、UIPreviewAction)} - (void)application:(UIApplication *)application performActionForShortcutItem:(UIApplicationShortcutItem *)shortcutItem completionHandler:(void (^)(BOOL))completionHandler { // react to shortcut item selections NS...
定位标注自己的位置 自定义大头针 反地理编码等用的是系统的mapview,因返回的是火星坐标,在进行反地理编码时出现偏差,用网上的一些坐标转换发现还是不准确,无奈只能引入高德地图的AMapSearch进行反地理编码。mapview = [[MKMapView alloc]initWithFrame:self.[mapview setCenterCoordinate:mapview.// MKMapPoint point2 = MKMapPointFor...
帮助 | 留言交流 | 联系我们 | 服务条款 | 下载网文摘手 | 下载手机客户端
北京六智信息技术股份有限公司 Copyright© 2005-2024 360doc.com , All Rights Reserved
京ICP证090625号 京ICP备05038915号 京网文[2016]6433-853号 京公网安备11010502030377号
返回
顶部