标签: xcode6

Swift和Spritekit不会在运行iOS 7.1的设备上运行

当我尝试使用Xcode 6在我的设备上运行我的Swift项目时,我收到了一个非常奇怪的警告.

该设备运行iOS 7.1,我的Mac正在运行Mavericks.

我在Swift和SpriteKit中编写了一个小游戏,它可以在模拟器中运行,但是当我尝试在我的设备上运行它时,我收到警告,而我的设备只显示黑色背景.

尝试运行一个新的SpriteKit项目时,我得到了相同的结果.但是,如果我使用Swift运行一个新的单页应用程序,它会正常运行.

这是我收到的警告:

在此输入图像描述

有什么建议?

sprite-kit swift xcode6

11
推荐指数
2
解决办法
4093
查看次数

OSX Yosemite和Xcode 6安装后的Ruby gem安装错误

我尝试在安装优胜美地之前安装一个像我一样的宝石,但现在我收到一个错误:

/Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:159:in"synchronize":错误:无法构建gem原生扩展.(宝石::内线:: BuildError)

错误:无法构建gem原生扩展.

僵局; 递归锁定

这是我写的命令:

sudo gem install mysql2
Run Code Online (Sandbox Code Playgroud)

这是它出现在终端中的消息:

Gem文件将保留在/Library/Ruby/Gems/2.0.0/gems/autotest-fsevent-0.2.9中进行检查.结果记录到/Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/autotest-fsevent-0.2.9/gem_make.out

Gem文件将保留在/Library/Ruby/Gems/2.0.0/gems/autotest-fsevent-0.2.9中进行检查.结果从/Library/Ruby/Site/2.0.0/rubygems记录到/Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/autotest-fsevent-0.2.9/gem_make.out /ext/builder.rb:159 build_extension' from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:198:in:来自/Library/Ruby/Site/2.0.0中的/Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:195:in each' from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:195:in build_extensions' 中的build_extensions'中的块/rubygems/specification.rb:1436:in block in build_extensions' from /Library/Ruby/Site/2.0.0/rubygems/user_interaction.rb:45:in"从/Library/Ruby/Site/2.0.0/rubygems/specification.rb:1434:in use_ui build_extensions' from /Library/Ruby/Site/2.0.0/rubygems/stub_specification.rb:60:in build_extensions'从/Library/Ruby/Site/2.0.0/rubygems/basic_specification .RB:56:在 contains_requirable_file?' from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:925:in中find_inactive_by_path块'从/Library/Ruby/Site/2.0.0/rubygems/specification.rb:924:in each' from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:924:in找到'从/Library/Ruby/Site/2.0.0/rubygems/specification.rb 924:在 find_inactive_by_path' from /Library/Ruby/Site/2.0.0/rubygems.rb:185:intry_activate '从/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:132:in rescue in require' from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:144:in 需要'从/Library/Ruby/Site/2.0.0/rubygems.rb:601:in load_yaml' from /Library/Ruby/Site/2.0.0/rubygems/config_file.rb:328:inLOAD_FILE"从/Library/Ruby/Site/2.0.0/rubygems/config_file.rb:197:in initialize' from /Library/Ruby/Site/2.0.0/rubygems.rb:289:in新"从/Library/Ruby/Site/2.0.0/rubygems.rb:289:in configuration' from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:63:in运行"从/库/红宝石/网站/ 2.0.0/RubyGems的/转/ ext_conf_bui lder.rb:38: block in build' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tempfile.rb:324:in 从/Library/Ruby/Site/2.0打开'from /Library/Ruby/Site/2.0.0/rubygems/ext/ext_conf_builder.rb:17:in build' from …

ruby macos gem xcode6

11
推荐指数
1
解决办法
4053
查看次数

Swift将委托设置为self赋予EXC_BAD_ACCESS

我正在通过移植现有的应用程序来学习Swift.我一直坚持设置代表,无法解决问题所在.

我有一个扩展UITableViewCell的类

import UIKit

protocol SwitchCellDelegate{
    func switchChanged(switchCell: SwitchCell, state: Bool)
}

class SwitchCell: UITableViewCell {

    @IBOutlet var swtSelector: UISwitch
    @IBOutlet var lblTitle: UILabel

    var delegate: SwitchCellDelegate?

    init(style: UITableViewCellStyle, reuseIdentifier: String) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
    }

    @IBAction func switchChanged(){
        delegate?.switchChanged(self, state: swtSelector.on)
    }

}
Run Code Online (Sandbox Code Playgroud)

然后在ViewController中定义为

class SettingsViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, SwitchCellDelegate {
Run Code Online (Sandbox Code Playgroud)

并在方法内

func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! {
Run Code Online (Sandbox Code Playgroud)

我们有

case 2:
    storeCredentialsCell = tableView.dequeueReusableCellWithIdentifier("StoreCredentialsCell") as? SwitchCell
    if(storeCredentialsCell != nil){
        ...
        NSLog("Setting delegate to %@ for …
Run Code Online (Sandbox Code Playgroud)

delegates exc-bad-access swift xcode6

11
推荐指数
2
解决办法
6363
查看次数

无法在iPhone上安装配置文件(iOS 8 beta 4/Xcode 6 Beta 4)

我无法将我的任何iOS开发者发行版或开发人员链接的配置文件安装到运行iOS beta 4的iPhone 5S上,并在OS X Yosemite开发预览版4中使用Xcode beta 4.我已经重新安装了iOS 8并进行了恢复,同样适用于yosemite和Xcode测试,撤销并创建新的开发证书,删除并向我的钥匙串访问添加新证书,并确保我的所有新配置文件都用于正确的证书.是的我是开发人员,并且我的iPhone udid被开发者门户网站帐户添加.我还确保将这个iPhone包含在配置文件中并加倍检查以确保我在Xcode上登录我的开发帐户.我似乎无法安装配置文件:(

我已经包含了Xcode的一些屏幕截图,据说告诉我已经安装了配置文件,但我的手机却说不然.我也尝试通过电子邮件发送给自己并安装,但我的手机仍然没有安装配置文件.

如果有人能帮助我,我真的很感激.

谢谢.

截图

截图2 在此输入图像描述

iphone ios xcode6 ios8 osx-yosemite-beta

11
推荐指数
2
解决办法
3万
查看次数

Compact和Regular尺寸等级的区别

我正在观看WWDC 2014 411_Whats_new_in_interface_builder会话视频.在该视频中,发言人Kevin Cathey讲述了大小等级.他告诉我有2个大小的类有2个值Compact和Regular.他告诉我们根据ViewController的大小来考虑大小等级.他展示了一个关于四个可能的尺寸等级组合调整条形高度的例子.实际上,我无法理解他试图谈论的不同之处我有三个问题:1.什么是紧凑和常规尺寸类2为什么尺寸等级有用?3.尺寸等级的四种组合如何影响模拟器(iPhone 5和5s等)?谢谢,Riduan

ios-simulator xcode6 ios8

11
推荐指数
1
解决办法
3254
查看次数

Xcode 6 GM版,iPhone 6模拟器,'UITapGestureRecognizer'没有可见的@interface声明选择器'initWithTarget:action:'

UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panGestureRecognized:)];
Run Code Online (Sandbox Code Playgroud)

这段代码可以为Xcode 5中的任何模拟器编译,

但在Xcode 6中,它只能编译32位CPU(iPhone 5及以下)的模拟器,

在编译64位CPU(iPhone 5s,iPhone 6,iPhone plus)的模拟器时,编译器说:

'UITapGestureRecognizer'没有可见的@interface声明选择器'initWithTarget:action:'

但我确实已经进口了 <UIKit/UITapGestureRecognizer>

有什么问题?

xcode ios xcode6

11
推荐指数
1
解决办法
1890
查看次数

6.0.1和表更改"UILabel?没有名为'text'的成员

我正在通过Swift表演示工作,并且所有这些演示在6.0.1下似乎都有相同的错误消息.不知道如何解决这个问题:

在此输入图像描述

ios swift xcode6

11
推荐指数
1
解决办法
5527
查看次数

Xcode 6中的应用程序数据包.始终崩溃或显示错误

如何正确使用Xcode 6中的应用程序数据包?我.xcappdata从设备导出文件,将其添加到我的工作区,然后在方案的"运行选项"中选择它.

每当我尝试使用iOS 8.0运行模拟器时,即使重复启动,手动启动等,我也会收到以下错误:

应用程序数据包未复制到模拟器
首次出现在iPad Air Simulator上运行"REDACTED.app",因此尚未创建数据文件夹.下次在模拟器中运行应用程序时,将安装应用程序数据包.

尝试在iOS 7.1上使用模拟器会导致Xcode崩溃.

通过对文件系统所做的更改,此功能是否不再起作用?


在Xcode Version 6.1.1(6A2008a)上再次尝试,它(有时)现在崩溃了Xcode,希望这意味着它很快就会被修复......

xcode ios ios7 xcode6 ios8

11
推荐指数
1
解决办法
736
查看次数

Xcode 6.1 titleTextAttributes

所以我正在编写这个应用程序,它具有彩色导航栏和该栏中标题的字体,UIBarButtonItems的字体应为白色和特定字体.我在AppDelegate中用这两行来完成它.

    UINavigationBar.appearance().titleTextAttributes = [NSFontAttributeName : UIFont(name: "SourceSansPro-Regular", size: 22), NSForegroundColorAttributeName : UIColor.whiteColor()]
UIBarButtonItem.appearance().setTitleTextAttributes([NSFontAttributeName : UIFont(name: "SourceSansPro-Regular", size: 22), NSForegroundColorAttributeName : UIColor.whiteColor()], forState: .Normal)
Run Code Online (Sandbox Code Playgroud)

但是使用Xcode 6.1我在每一行中都会出错,我真的不知道,有什么意思..

在此输入图像描述

文本属性是[NSObject:AnyObject]?.这正是我写下来的.有人有解决方案吗?

swift xcode6

11
推荐指数
1
解决办法
9091
查看次数

如何在Xcode 6中添加带边框的按钮到故事板

我想在Xcode 6中创建一个带边框的按钮.例如,我希望它看起来像这个库中的按钮 - https://github.com/a1anyip/AYVibrantButton - 没有任何特殊的视觉效果.是否可以通过在IB中进行一些设置而无需编写任何代码来实现这一目的?谢谢.

xcode objective-c ios xcode6 ios8

11
推荐指数
2
解决办法
3万
查看次数