草庐IT

nly-work

全部标签

ios - 调试 iOS 应用程序 : crash under Xcode but keep working on iPhone

我正在尝试使用Xcode在iPhone上调试我的iOS应用。我正在通过Xcode调试器启动应用程序,应用程序可以正常工作几分钟。然后我从Xcode收到错误消息:Theapp"myapp"on"iPhone_device"quitunexpectedly.Messagefromdebugger:Terminatedduetosignal9但iPhone上的应用程序一直正常运行,就像什么也没发生一样。这正常吗?这种Xcode行为的可能原因是什么?更新:我的应用程序是在后台运行的VoIP应用程序。我刚刚发现这种应用程序可以在崩溃后在后台自动启动。这可能是个问题吗?

html - CSS :hover not working on iOS Safari and Chrome

我有一个圆形的div,它有一个圆形的图像和底部的标题,opacity:0.5;悬停时不透明度应该变为1。它在所有桌面浏览器和FirefoxforiOS上工作正常但它不适用于Safari或iOS版Chrome。fiddle:https://jsfiddle.net/a10rLbnL/2/HTML:bangbangCSS:.video_wrap{display:inline-block;width:30%;padding-bottom:30%;margin:01%;position:relative;vertical-align:top;}.content{position:absolut

ios - 为什么 CSS background-size : cover not work in portrait mode on iOS?

我正在尝试跨设备设置手动splash-image。我通过检查orientation(触摸设备)或screenwidthvs.screenheight(非触摸)并相应地设置url来实现。然后我通过Javascript添加这个CSS规则:document.styleSheets[3].insertRule('.initHandler:before{background:url('+x+')no-repeatcentercenterfixed;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size

ios - 导航 Controller popViewControllerAnimated : yes is not working as expected

我正在使用以下代码行:[self.navigationControllerpopViewControllerAnimated:YES];但它在ios7中的行为与在ios6中的行为不同。有时,当我们连续按下后退按钮2-3次时,它不会弹出Controller。导致导航栏出现突然行为并取消分配Controller但在ui上显示相同。因此,当我们在该Controller上按下任何东西时,都会导致崩溃,因为Controller已经被释放。 最佳答案 检查您是否在UI线程上运行代码 关于ios-导航

ios - MFMessageComposeViewController iOS7 添加附件数据 :typeIdentifier:filename: not working

我想在iOS7上将图像附加到MMS。我写了以下代码:MFMessageComposeViewController*messageController=[[MFMessageComposeViewControlleralloc]init];messageController.messageComposeDelegate=self;NSData*imgData=[NSDatadataWithContentsOfFile:@"blablabla"];BOOLdidAttachImage=[messageControlleraddAttachmentData:imgDatatypeIdenti

objective-c - 使用resizableImageWithCapInsets : image for button only works for the state set, 其他状态显示 "gap"

当使用resizableImageWithCapInsets:为UIButton创建图像时,只有正常状态(使用setBackgroundImage:forState:设置图像的状态)有效。所有其他状态显示间隙而不是绘制的图像。UIButton表示如果没有为特定状态设置图像,则正常状态图像将与禁用和选定状态的叠加层一起使用。这是正常状态:这里是选中状态:这是源图像:它显然是在使用我提供的可调整大小的图像,但图像并没有绘制调整大小的区域。(可以看到左右边缘,只是中间要拉伸(stretch)的区域没有画出来)。有趣的是,stretchableImageWithLeftCapWidth:top

ajax - 电话间隙 : cookie based authentication (PHP) not working [webview]

我正在使用senchatouch、HTML5和phonegap作为包装器开发移动网络应用程序。我正在使用PHP身份验证(Cookie)和ajax请求。在safari或chrome上一切正常,但在使用phonegap(webview)部署后它不再工作了......任何帮助将不胜感激:)更多细节:我的应用程序的所有数据都通过ajax请求加载到我的服务器组件“mobile.php”。我使用基本的PHP-Auth来验证用户:AJAX请求[用户名、密码]->mobile.php->session建立(cookie)如果身份验证成功,则所有其他请求普通的safari网站和webview有什么区别?

ios - scrollViewWillEndDragging :withVelocity:targetContentOffset: not working on the edges of a UISCrollView

我正在尝试实现一个自定义标签栏,它是可滚动的并且在每个标签栏项目上都有分页。为此,我正在使用代理scrollViewWillEndDragging:withVelocity:targetContentOffset:它完美地解决了一个问题。我的分页工作方式是,如果contentOffset靠近正确的项目,则targetContentOffset更改为该项目的偏移量。左侧也是如此。问题是,每当我位于第一个项目的左半部分和最后一个项目的右侧(ScrollView水平工作)时,它应该转到ContentOffset0和最右边项目的内容偏移量(减去屏幕上的那些),但事实并非如此。我检查了调试器,t

iOS Geofence CLCircularRegion 监控。位置管理器 :didExitRegion does not seem to work as expected

我目前正在尝试让我的应用程序使用CoreLocation监控特定区域,但是我发现它似乎没有按预期工作,在我看来它不能与小的一起工作为每个位置设置半径,即10m。我还整理了一个小测试应用程序,它在map上绘制了圆半径,这样我就可以直观地看到发生了什么。我用于监控位置的代码如下:self.locationManager=[[CLLocationManageralloc]init];self.locationManager.delegate=self;self.locationManager.desiredAccuracy=kCLLocationAccuracyBest;//Set-upar

ios - NSTimer timerWithTimeInterval : not working

在我的项目中实现它之前,我已经创建了一个带有计时器的测试应用程序。这是我第一次使用定时器。但问题是当我使用[NSTimertimerWithTimeInterval:target:selector:userInfo:repeats:];实现计时器时,它不工作。这是我的代码,界面:@interfaceuialertViewController:UIViewController{NSTimer*timer;}-(void)displayAlert;-(void)hideandview;@end实现:@implementationuialertViewController-(void)vie