我正在尝试添加带纹理的圆形按钮NSToolbar
.我使用Interface Builder添加NSButton
到允许的工具栏项和默认项.
我正在使用window!.titleVisibility
设置为的Safari样式工具栏.hidden
.
Xcode 8打印此错误消息:
NSToolbarItem (<NSToolbarItem: 0x100c24000>) had to adjust the size of
<NSButton: 0x100c36690> from {43, 25} to {45, 27} as the height is expected to be
27.000000. Make sure that this toolbar item view has a valid frame/min/max size.
Run Code Online (Sandbox Code Playgroud)
这在以前的OS X版本中对我有用.
我尝试将最小和最大工具栏项高度设置为27,但Xcode会自动将最小值恢复为25.
我们是否应该在将Visual 2012 C++项目迁移到目标64位平台时将预处理器定义从WIN32更改为WIN64.
现在我用以下settigns建立了这个项目
MACHINE(指定目标平台)设置为/MACHINE:X64
.
目标环境设置为 /env x64
在C/C++项目设置 - >代码生成,结构成员Allignment到8 BYtes
请指导我应该改变哪些项目设置.
自从我更新到Xcode 7.3后,我遇到了问题UIStackView
.如果我创建一个空项目并且只使用默认的拥抱和压缩优先级放入两个UILabel
s UIStackView
,它会显示AutoLayout错位信息错误.它甚至不适用于一个(!)UILabel
in UIStackView
,所以优先级无关紧要(因为我认为,可能存在问题).
我记得在Xcode之前7.3一切都很好.我分别检查了两台MacBook Pro,这是同样的问题.
有人知道怎么解决吗?
我在另一台计算机上设置了一个远程Git存储库和Xcode Server,然后在Xcode中创建了一个bot.每次我尝试进行新的集成时,都会失败并出现如下错误:
Assertion: Opening import file for module 'Accelerate': Permission denied
File: <filename>.swift:9
Run Code Online (Sandbox Code Playgroud)
如果我评论此文件中的所有内容,bot会开始为另一个框架(以及另一个.swift文件)显示相同的错误.它可以是Swift或Objective-C框架.
Search Paths
对于这个项目是:$(PROJECT_DIR)
,并Always Search User Paths
设置为Yes
我正在使用Xcode 7.2 beta 2,但我在App Store中遇到了与Xcode 7.1相同的问题.我尝试重新启动Xcode以及服务器和开发Mac,它没有帮助.该项目在我的开发机器上成功编译和运行.
服务器日志:(xcsbuildd.log)
[BuildService] Previous integration is needed but not loaded yet, fetching.
[BuildService] Previous integration loaded successfully.
[BuildService] Completed integration step XCSCheckoutIntegrationStep without error
[BuildService, Info] Asset packs will be hosted at <server url here>
[BuildService] Current server devices are needed but not loaded yet, fetching.
[BuildService] Devices loaded successfully. …
Run Code Online (Sandbox Code Playgroud) 我创建了一个 Swift 库,swift package init --type library
并使用swift package generate-xcodeproj
.
现在我正在尝试在 Xcode 中运行测试方案。它打印以下错误:
Module '<title>' was not compiled for testing
Run Code Online (Sandbox Code Playgroud)
然而,当我运行swift build
,并swift test
在终端,它工作正常。
我已经在所有目标中ENABLE_TESTABILITY
设置YES
了。除了这个,我没有改变项目中的任何东西。如何让 Xcode 执行单元测试?
我创建了一个多平台的Kotlin项目(JVM和JS),声明了一个期望的类并实现了它:
// Common module:
expect class Request(/* ... */) {
suspend fun loadText(): String
}
// JS implementation:
actual class Request actual constructor(/* ... */) {
actual suspend fun loadText(): String = suspendCoroutine { continuation ->
// ...
}
}
Run Code Online (Sandbox Code Playgroud)
现在我正在尝试使用单元测试kotlin.test
,对于JVM平台,我只是使用runBlocking
如下:
@Test
fun sampleTest() {
val req = Request(/* ... */)
runBlocking { assertEquals( /* ... */ , req.loadText()) }
}
Run Code Online (Sandbox Code Playgroud)
如果没有,我怎样才能在JS平台上重现类似的功能runBlocking
?
首先,我是可可开发的新手,所以我想我可能试图以错误的方式做到这一点,但是这里有:
我有一个NSOutlineView
从NSOutlineViewDataSource
实现加载数据.我希望所有项目在加载后都要展开,但我似乎无法在数据加载完成后找到一个事件,所以我可以发送一个[outlineView expandItem: nil expandChildren: YES]
.
我查看了NSOutlineViewDelegate
协议,但我找不到适合这个电话的地方.这个问题的最佳方法是什么?
我想使用Xcode和Storyboard在iOS 6中创建Facebook iPhone应用程序中的侧边菜单.我该怎么做?
谢谢.
这是代码
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
if (PFUser.currentUser() == nil) {
self.LogInViewController.fields = PFLogInFields.SignUpButton | PFLogInFields.PasswordForgotten | PFLogInFields.DismissButton
}
}
Run Code Online (Sandbox Code Playgroud)
国王问候
我用a UIAlertController
来呈现一个带有两个UITextField
s 的对话框.如何设置TextFields的距离UIAlertController
?
[alertController addTextFieldWithConfigurationHandler:
^(UITextField *textField) {
textField.placeholder = @"Nick Email";
textField.textColor = [UIColor blueColor];
textField.clearButtonMode = UITextFieldViewModeWhileEditing;
textField.text=username;
textField.userInteractionEnabled = NO;}];
[alertController addTextFieldWithConfigurationHandler:^(UITextField *textField) {
textField.placeholder = @"Full Name";
[textField setKeyboardType : UIKeyboardTypeEmailAddress];
textField.textColor = [UIColor blueColor];
textField.clearButtonMode = UITextFieldViewModeWhileEditing;
textField.text=email;
textField.userInteractionEnabled = NO;
}];
Run Code Online (Sandbox Code Playgroud)
xcode ×5
ios ×4
macos ×2
swift ×2
64-bit ×1
autolayout ×1
cocoa ×1
facebook ×1
ios6 ×1
kotlin ×1
macos-sierra ×1
objective-c ×1
storyboard ×1
uialertview ×1
uilabel ×1
uistackview ×1
visual-c++ ×1
xcode-bots ×1
xcode-server ×1
xcode7 ×1
xcode8 ×1