Tag: ios8

dyld:图书馆没有加载:@rpath与iOS8

我正在用Xcode6和iOS8创build一个iOS框架。 当我连接这个iOS应用程序,并尝试在设备上运行它,我得到这个错误 dyld: Library not loaded: @rpath/FrameworkName.framework/FrameworkName Referenced from: /private/var/mobile/Containers/Bundle/Application/0F2C2461-A68B-4ABA-A604-B88E6E9D1BB1/AppName.app/AppName Reason: image not found 框架的“运行pathsearchpath”构build设置默认设置为 '@executable_path/Frameworks', '@loader_path/Frameworks' 我找不到任何相关的文件。 这是Xcode6中引入的一些新function,我希望它只是简单地将框架包含到任何需要它的应用程序中。

iOS8图标大小和名称的图标和启动图像

我没有findiOS8的大小和应用程序图标和启动图像名称的直接网站。 我已经看过iOS人机界面指南,但他们并没有真正告诉你如何命名它们。 有人可以列出他们吗?

如何获得iOS 8的UICollectionViewCells的自动布局大小? (在iOS 8中,systemLayoutSizeFittingSize返回高度为零的大小)

由于iOS 8 [UIColletionViewCell systemLayoutSizeFittingSize:UILayoutFittingCompressedSize]返回高度为0的大小。 代码如下: 要确定iOS 7中UICollectionView中单元格的大小,我使用systemLayoutSizeFittingSize:在使用自动布局的xib文件中定义的单元格上。 大小取决于作为我的xib文件中的UICollectionViewCell的子视图的UILabel的字体大小。 标签的字体被设置为UIFontTextStyleBody 。 所以基本上单元格的大小取决于在iOS 7中设置的字体大小。 这是代码本身: + (CGSize)cellSize { UINib *nib = [UINib nibWithNibName:NSStringFromClass([MyCollectionViewCell class]) bundle:nil]; // Assumption: The XIB file only contains a single root UIView. UIView *rootView = [[nib instantiateWithOwner:nil options:nil] lastObject]; if ([rootView isKindOfClass:[MyCollectionViewCell class]]) { MyCollectionViewCell *sampleCell = (MyCollectionViewCell*)rootView; sampleCell.label.text = @"foo"; // sample […]

没有成员“instantiateWithOwner”

我正在尝试制作一个像我之前提到的问题中描述的popup窗口。 我其实有一个答案,但现在我有一个新的问题。 我可以让视图出现,如果我不做instantiateWithOwner ,但它不响应任何东西(只是冻结)。 总之,我已经build立了一个'popup.xib'文件,它只是一个带有button和标签的视图。 我的下面的代码应该使它出现和button点击消失。 我已经阅读了instantiateWithOwner将视图连接到它的callbackbutton的所有魔术的文档,所以当它不在代码中时没有任何反应。 ( 参考 ) 事情是,如果我包括它在我的代码,我得到一个编译器错误'PopupViewConrtoller' does not have a member named 'instantiateWithOwner' 。 我试图search自动完成列表,但没有发现类似的东西。 我的代码: ViewController.swift import UIKit class ViewController: UIViewController { @IBAction func showPopup(sender: AnyObject) { // This line makes it appear on the screen, but not respond to anything. var x = PickerPopupViewConrtoller(nibName: "PickerPopup", bundle: nil) // […]

SKLabelNode会消失,但仍然是可点击的

我正在使用SpriteKit和Swift制作游戏,运行Xcode 6.我有一个SKLabelNode ,在这个例子中我们称之为myLabelNode 。 当我调用myLabelNode.removeFromParent()它会从场景中删除节点,因为它应该。 节点数量下降1,并且在屏幕上的任何地方都不可见。 但是,当我点击myLabelNode以前的位置时,我的程序仍然会调出只有在触摸myLabelNode时才会发生的function。 我也尝试将myLabelNode.removeFromParent()与myLabelNode.hidden = true结合起来,但它仍然是可触摸的,即使它不应该调用该函数。 我应该如何解决这个问题? 我应该使用不同的方法吗? 这是否应该发生? 编辑: let lemonadeLabel = SKLabelNode(fontNamed: "Optima-ExtraBlack") override func didMoveToView(view: SKView) { lemonadeLabel.text = "Lemonade Stand" lemonadeLabel.fontSize = 24 lemonadeLabel.fontColor = SKColor.yellowColor() lemonadeLabel.position = CGPoint(x: size.width/2, y: size.height*0.66) lemonadeLabel.zPosition = 2.0 addChild(lemonadeLabel) } override func touchesEnded(touches: NSSet, withEvent event: UIEvent) { let touch […]

在iPad上浏览时,应用程序没有运行iPhone分辨率

我在iTunes上的应用程序被拒绝,因为: “我们注意到,当你在运行iOS 8.1.3的iPad上浏览时,你的应用程序没有运行在iPhone的分辨率下,这违反了App Store评论指南,具体来说,我们没有发现应用程序在浏览时显示”Go“button在iPad上“。 任何人都可以指导我,我如何configuration我的应用程序布局,以便它可以在iPad上正常运行?

本地通知是否可以在iOS8中触发代码?

我正在尝试创build一个需要超过64个本地通知的应用程序。 系统在没有用户与通知交互的情况下向用户发送通知时,是否有任何触发代码的方式?

UIPopoverController中的UIImagePickerController不显示iOS7上的取消button

我使用UIPopoverController中的UIImagePickerController从相册中select图像。 当我在运行iOS 8的设备上启动应用程序时,popup窗口右上angular的“取消”button正常显示如下: 但是,当我在运行iOS 7的设备上启动应用程序时,“取消”button消失: 我用来显示select器的代码: UIImagePickerController *pickerController = [[UIImagePickerController alloc] init]; [pickerController setSourceType:UIImagePickerControllerSourceTypePhotoLibrary]; pickerController.delegate = self; _popOver = [[UIPopoverController alloc] initWithContentViewController:pickerController]; _popOver.delegate = self; pickerController.navigationBar.tintColor = [UIColor redColor];//Cancel button text color [pickerController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor blackColor]}];// title color if (isImage) { [pickerController setMediaTypes:@[(NSString*)kUTTypeImage]]; } else [pickerController setMediaTypes:@[(NSString*)kUTTypeMovie]]; [_popOver presentPopoverFromRect:CGRectMake(1024/2, 768/2, 1, 1) inView:self.view permittedArrowDirections:0 animated:YES]; […]

将parameter passing给dispatch_async

我是新来的Swift,看看dispatch_async函数是如何工作的。 API文档显示具有两个参数的dispatch_async。 不过,我可以通过一个论点,没关系。 dispatch_async(dispatch_get_main_queue()) { } 我怎么不需要通过两个论点? 谢谢, API文件:

在ios中添加视图控制器作为子视图

嗨,我想添加一个view controller作为child view 。 后来删除这个view controllerforms父视图。我使用下面的代码为此目的。 self.loginView = [self.storyboard instantiateViewControllerWithIdentifier:@"LOGIN"]; [self.view addSubview:self.loginView.view]; 此代码适用于iOS8但在iOS7此代码不起作用,显示屏幕的一半。显示半部分login。 什么可能是这个解决scheme?