草庐IT

transit-time

全部标签

iphone - 无法将 UIMapView 获取到 "zoom"/setRegion : when the map is loaded for the first time

我有一个UIViewController可以加载一张map,上面已经有一堆图钉。让图钉出现没有问题,但我似乎无法让MKMapView在用户首次到达mapView时执行setRegion。我已尝试将代码放入所有可行的方法中,viewDidLoad、viewWillLoad、mapViewWillStartLoadingMap、mapViewDidFinishLoadingMap等,无济于事。然而,如果我返回到前一个viewController,然后再次进入包含mapView的viewContoller,它将“缩放”到指定区域。是否有一种我不知道的supersecret方法?调用[mapV

ios - XCUI 测试 : How to click Labels populated at run time

我正在尝试单击在运行时填充和缓存的标签。TableViewCell有一个在运行时决定的UILabel。所以我无法为其添加辅助功能标识符。但是我已经在UILabel中添加了一个标识符,但是当我寻找标签时,这个View会重复几次[tablesQuery.staticTexts[@"Channels"]tap];我收到一个错误,找到了多个匹配项我已经在tableView的UILabel中添加了一个标识符,myIdentifier。如何访问标签以自动点击?来自app.debugDescriptionAssertionFailure:Smoke.m:238:Nomatchesfoundfor"R

ios - UISearchBar with statusbar animation transition bug ios7

我对UISearchBar动画有疑问。当状态栏打开时,动画有问题。否则没关系。我以编程方式创建了表格View和搜索栏。uisearchbar位于TableView的标题View中。保持这种状态很重要。我知道当你使用Storyboard时它工作正常。我创建了一个非常基本的示例项目,因为我认为这是向您展示问题的最简单方法。我花了几个小时来找到解决方案,但我就是想不通。任何帮助将不胜感激。这是示例项目的链接:SearchBarProject! 最佳答案 我发现self.navigationController.navigationBar.

ios - applicationDidEnterBackground : and time to write on a database

当应用程序终止时,我将数据写入数据库。从iOS4开始,applicationWillTerminate:没有被调用,我在applicationDidEnterBackground:和applicationWillTerminate:中放置了相同的保存代码我读到在applicationDidEnterBackground:中执行的任务必须花费一些时间。那么,如果在数据库上写入需要更多的时间,我该如何管理呢? 最佳答案 您有5秒的时间在applicationDidEnterBackground:方法中执行任何保存等操作。如果您需要超过5

ios - 如何在 iOS 上获取 "internet time"?

这个问题在这里已经有了答案:Isthereanywaytogetthetamper-proofdateandtimeoniPhone?(1个回答)关闭8年前。因此,我正在开发一个基于时间的应用程序,但使用NSDate,用户可以通过更改设备的系统时间轻松破解该应用程序。所以我可能想使用更好的方法来检索时间。我该怎么做?有没有一种简单的方法可以从互联网上检索时间?

ios - 如何在 Google Analytics 仪表板上看到 'User timing'?

我在我的iOS应用程序中使用GA,所有跟踪器都运行良好,但现在我为用户计时添加了跟踪器,但我无法看到我发送的信息。这是我正在使用的代码:NSTimeIntervaltimeInterval=[timeOfPausetimeIntervalSinceDate:timeOfStart];NSNumber*timeUsed=[NSNumbernumberWithDouble:timeInterval];[trackersend:[[GAIDictionaryBuildercreateTimingWithCategory:@"ui_action"interval:timeUsedname:@"

iphone - ARC 中的 generateCGImagesAsynchronouslyForTimes

如果我在启用了ARC的项目中运行以下命令,完成处理程序将永远不会触发。但如果没有ARC,它会按预期工作。我在这里缺少什么?NSURL*url=[NSURLURLWithString:@"http://media.w3.org/2010/05/sintel/trailer.mp4"];AVURLAsset*asset=[[AVURLAssetalloc]initWithURL:urloptions:nil];AVAssetImageGenerator*generator=[[AVAssetImageGeneratoralloc]initWithAsset:asset];generator

jquery - CSS Transition 相当于 jQuery fadeIn(), fadeOut(), fadeTo()

我有这个$('#button1').click(function(){$('#header_bg').fadeTo(15,0,function(){document.getElementById('header_bg').style.fill='#FF0000';}).fadeTo('slow',1);$('#header_text1').fadeOut(250);$('#header_text2').fadeIn(250);});我正在尝试提高jQuery重度网站的移动性能(在iOS上)。我读过iOS比jQuery更好地处理CSS转换。让这些iOS友好的最佳方法是什么?

iphone - 应用特定信息 : Application failed to launch in time (iOS)?

这是我的一份崩溃报告的顶部。Apple是否有任何AppLaunch超时限制?如果是这样,有什么常见的解决方法吗?ElapsedtotalCPUtime(seconds):13.700(user8.580,system5.120),67%CPUElapsedapplicationCPUtime(seconds):6.180,30%CPU在iPhone3G上。我可能不得不拆分/延迟我的启动任务...... 最佳答案 我认为它必须在5(或可能10)秒内启动,否则iPhone会认为它已经崩溃。尽量避免在启动时在主线程上加载大量内容。如果您需

ios - 查看标签 : returns nil on UITableViewCell only first time

当UITableViewCell第一次通过dequeueReusableCellWithIdentifier:从Storyboard加载时:viewWithTag:返回nil对象。但在第二次和下一次重新加载时,它会返回正确的对象。我的tableView嵌入到带有原型(prototype)单元的UIViewController(在Storyboard中)cellAttachment=[_tableViewdequeueReusableCellWithIdentifier:@"cellAttachment"];UIButton*btnAttachment=nil;btnAttachment