在iPad和iPhone上不显示背景图像

我想创build一个背景覆盖在移动网页的部分,所以我使用了下面的CSS代码: #section1{ background: url("background1.png") auto 749px; height: 749px; } 背景在Android(Chrome,Firefox …)上正确显示,但在iPhone或iPad(Safari,Chrome iOS …)上完全不显示。 我已经尝试使用jQuery在DOM准备好时设置这些属性,但没有运气。 我读过的大小可能是一个问题,但图像大约700kB(1124x749px),所以它应该完成Safari网页内容指南规则。 这是什么问题?

如何在iOS 10 UserNotifications上设置NSCalendarUnitMinute repeatInterval?

在UILocalNotification我们使用NSCalendarUnitMinute像重复…..但我找不到iOS 10 UserNotification文档 …我怎样才能使用NSCalendarUnitMinute像在iOS 10 UserNotification重复? 这里是在晚上8点30分安排当地通知的代码,并在每一分钟后重复。 UILocalNotification* localNotification = [[UILocalNotification alloc] init]; localNotification.fireDate = pickerDate; localNotification.alertBody = self.textField.text; localNotification.timeZone = [NSTimeZone defaultTimeZone]; localNotification.repeatInterval = NSCalendarUnitMinute; localNotification.applicationIconBadgeNumber = [[UIApplication sharedApplication] applicationIconBadgeNumber] + 1; [[UIApplication sharedApplication] scheduleLocalNotification:localNotification];

从iPhone应用程序进行编程,结束通话后返回到应用程序

我试图从我的iPhone应用程序发起一个电话,我做了以下的事情.. -(IBAction) call:(id)sender { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Call Besito" message:@"\n\n\n" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Submit", nil]; [alert show]; [alert release]; } – (void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex { if (buttonIndex != [alertView cancelButtonIndex]) { NSString *phone_number = @"0911234567"; // assing dynamically from your code [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel:%@", phone_number]]]; NSString *phone_number = @"09008934848"; NSString *phoneStr = […]

我如何在iOS上进行面部识别?

我已经开始使用iOS应用程序来识别照片或iPhone / iPad相机中的脸部。 像OpenCV和Core Image(iOS 5.0)等现有的解决scheme提供了一个图像中的面部检测,但我找不到一个图像或例子,匹配一个人的脸。 对于iOS来说,是否存在这样的面部识别手段,而不仅仅是检测?

Xcode 4.2 SIGABRT错误

每当我在iPad模拟器上运行我的应用程序时,它都可以正常工作。 但是,当我在iPhone模拟器上运行它,当我点击主页button时,我的main.m文件中的Xcode出现错误,说:“线程1:程序接收信号:SIGABRT”。 在main.m的代码中突出显示了这一行: return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 当我按下iPad模拟器上的主页button时,不会发生这个问题。 我在这里做了很多关于这个错误的研究,但似乎没有什么用处。 有谁知道如何去解决这个问题? 编辑:这是来自debugging器控制台的更多信息 “无法在引导程序服务器上注册None.TestApplication。错误:未知的错误代码。这通常意味着该进程的另一个实例已经在运行,或者挂载在debugging器中.sharedlibrary apply-load-rules all当前语言:auto;目前的Objective-C(GDB)

将自定义字体应用于从HTMLstring转换的属性string

我用UITextView显示NSAttributedString 。 我从服务器得到HTMLstring。 我使用下面的代码将HTML转换为NSAttributedString。 NSMutableAttributedString *attrib = [[NSMutableAttributedString alloc]initWithData:[strHTML dataUsingEncoding:NSUTF8StringEncoding] options:@{NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType, NSCharacterEncodingDocumentAttribute: @(NSUTF8StringEncoding)} documentAttributes:nil error:nil]; 申请字体,我尝试以下2代码。 应用属性 自定义string 应用属性我使用下面的代码。 [attrib addAttribute:NSFontAttributeName value:myFont range:NSMakeRange(0, attrib.length)]; 对于自定义string首先我创build下面的NSString ,然后在NSAttributedString中NSAttributedString NSString *strHTML = [NSString stringWithFormat:@"<span style=\"font-family: myFont; font-size: 12\">%@</span>",@"my string"]; 使用两个代码字体已成功更改。 但粗体和斜体不应用只有下划线应用在NSAttributedString中。 我参考下面的链接。 iOS 7使用HTMLstring作为NSAttributedString并设置字体? 当从html创buildnsattributedstring时,ios7字体大小发生变化 如何将HTML的CSS添加到NSAttributedString? 对于链接3我应该从服务器端应用字体和标签,然后检索HTMLstring? 任何帮助将appriciated!

MFMailComposeViewController由于iOS6上的全局外观属性而崩溃

当我介绍一个MFMailComposeViewController时,我得到以下崩溃: 2013-11-08 11:04:05.963 <redacted>[7108:1603] *** Assertion failure in NSDictionary *_UIRecordArgumentOfInvocationAtIndex(NSInvocation *, NSUInteger, BOOL)(), /SourceCache/UIKit/UIKit-2380.17/UIAppearance.m:1118 2013-11-08 11:04:06.032 <redacted>[7108:1603] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unknown key, "NSColor" in title text attributes dictionary' 我在AppDelegate的application:didFinishLaunchingWithOptions:追踪了下面的外观设置application:didFinishLaunchingWithOptions: method: [[UINavigationBar appearance] setTitleTextAttributes: @{NSForegroundColorAttributeName : [UIColor whiteColor]}]; 注释该行出了窍门,但遗失了应用程序的其余部分,所以我试着将titleTextAttributes设置为MFMailComposeViewController的空字典: 尝试#1 [[UINavigationBar appearanceWhenContainedIn: NSClassFromString(@"MFMailComposeViewController"), nil] setTitleTextAttributes:@{ }]; 这导致相同的崩溃。 和 [[UINavigationBar appearanceWhenContainedIn: […]

私有区域的CKQuery只返回来自CloudKit的前100条CKRecords

对Cloudkit私有默认区域的查询结果是否有限制? 我不知道为什么我只收到前100个logging与以下查询: let p = NSPredicate(format: "(type == 'entered') AND (timestamp >= %@) AND (timestamp <= %@)", from, to) let q = CKQuery(recordType: self.beaconRecordType, predicate: p) q.sortDescriptors = [NSSortDescriptor(key: "timestamp", ascending: true)] self.privateDatabase?.performQuery(q, inZoneWithID: nil, completionHandler: { results, error in //count = 100 println(results.count) } 好的。 正如Edwin在答案中提到的,解决scheme是使用CKQueryOperation获取数据的初始块,然后使用completionBlock中的“游标”来触发另一个操作。 这里是一个例子: UPDATE func fetchBeacons(from:NSDate, to:NSDate) { let p […]

升级到xcode 4.6和iOS 6.1后出错“,用作前一个参数的名称而不是select器的一部分”

更新到xcode 4.6和ios6.1之后,我得到这个新的错误“'objectType'作为前一个参数的名称,而不是作为select器的一部分 ”。 我多次得到这个。 有任何想法吗? PS:它显示的方法是用于反向地理编码的自定义方法。 -(void) getAddress: (NSString *) objectType: (CLLocationCoordinate2D) objectCoordinate

如何检测iPhone UITableView上的编辑模式

对于我的iPhone应用程序,我有一个可编辑的(删除)表视图。 我希望能够检测到用户点击了“编辑”button。 看到这个图像: http : //grab.by/It0 从文档,看起来像是如果我实施: – (void)tableView:(UITableView *)tableView willBeginEditingRowAtIndexPath:(NSIndexPath *)indexPath 那么我可以检测到它(虽然从方法的名称,我不会这么认为)。 这certificate不起作用。 任何想法检测到这个? 我想要的是我想要在删除模式下挂钩左上angular的“全部删除”button。 谢谢