在OSX上我有一个非常暗的图像的NSButton,不幸的是,使用属性检查器无法更改颜色.看图片大黑色按钮,文字是Go.

是否有可能改变文字颜色的线索?我查看了NSButton类,但没有方法可以做到这一点.我知道我可以使用白色字体制作图像,但这不是我想要做的.
来自瑞士的问候,罗纳德霍夫曼---
从昨天开始,当点击导航器中的nib文件时,我得到"文档不受源代码管理".而不是图形表示我看到xml.
我从2012年3月21日开始使用当前版本4.3.2(4E2002).但是这个错误昨天晚上首先出现了.重新启动和清理项目没有帮助,重新启动mac也没有帮助.当切换到另一个项目时,我没有那个问题.我不知道我改变了任何偏好.
有什么线索错了吗?
解
我发现了什么错误:"显示版本编辑器"已打开.关闭它时错误消失了.
罗纳德
我想发送主题和正文的电子邮件.
这是我现在的代码,它按预期工作.它离开了我的应用并在Mail中创建了一条新消息.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"mailto:wettbewerb@neunfornkunst.ch"]];
Run Code Online (Sandbox Code Playgroud)
但是,我想创建更复杂的消息,包括主题和正文,如下所示:[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"mailto:wettbewerb@neunfornkunst.ch?subject = my Subject?body = my Body"]];
一旦我添加主题,它什么都不做.
知道我做错了吗?
我对委托方法有疑问。将数组填充到tableView中的其中之一没有触发,我不明白为什么。结果是我的tableView具有预期的行数,但它们都是空的。我设置了断点,但它并不止于此。
有什么线索可以尝试吗?
//This is working
- (id)init {
self = [super init];
cmdListMain = [NSArray arrayWithObjects: @"Cat", @"Dog", @"Fish", nil];
NSLog (@"init");
return self;
}
//This is working
- (int) numberOfRowsInTableView: (NSTableView *) tv
{
NSLog(@"numberOfRowsInTableView");
return [cmdListMain count];
}
//This one is not firing**
- (id)cmdTableView:(NSTableView *)tv
objectValueForTableColumn :(NSTableColumn *)cmdTableView
row :(int)rowIndex
{
NSLog(@"cmdTableView");
NSString *v = [cmdListMain objectAtIndex:rowIndex];
return v;
}
//This is working
-(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *) theApp {
return YES;
}
Run Code Online (Sandbox Code Playgroud) 我有一个包含两个元素50和60的数组:
NSArray*array = [NSArray arrayWithObjects:
[NSNumber numberWithLong:50],
[NSNumber numberWithLong:60], nil];
Run Code Online (Sandbox Code Playgroud)
稍后使用数组时(事实上我将此数组作为默认列表写入plist文件)我这样做:
long value = [array objectAtIndex:1];
Run Code Online (Sandbox Code Playgroud)
此值包含15559后我不明白.在调试器中[array objectAtIndex:1]清楚地显示(长)60.

对不起,我看不出有什么不对;(
有任何想法吗?
罗纳德
我正在使用这段代码来获取文件夹pathTo_Folder中包含的文件.我得到的是这样的:"file://localhost/Users/ronny/DEV/0200-ObjC4/ModernTimes/DrawingFun/linen/Tech-2.jpg","file:// localhost/Users/ronny/DEV /0200-ObjC4/ModernTimes/DrawingFun/linen/Tech-3.jpg","file://localhost/Users/ronny/DEV/0200-ObjC4/ModernTimes/DrawingFun/linen/Tech-4.jpg","file ://localhost/Users/ronny/DEV/0200-ObjC4/ModernTimes/DrawingFun/linen/Terra-1.jpg","file:// localhost/Users/ronny/DEV/0200-ObjC4/ModernTimes/DrawingFun/linen /Terra-2.jpg","file://localhost/Users/ronny/DEV/0200-ObjC4/ModernTimes/DrawingFun/linen/Terra-3.jpg","file:// localhost/Users/ronny/DEV /0200-ObjC4/ModernTimes/DrawingFun/linen/Terra-4.png","file://localhost/Users/ronny/DEV/0200-ObjC4/ModernTimes/DrawingFun/linen/Terra-5.png","file ://localhost/Users/ronny/DEV/0200-ObjC4/ModernTimes/DrawingFun/linen/Terra-6.jpg"
我想知道是否有办法只获取没有像"Tech-2.jpg"这样的包含文件夹的文件名
NSString *pathTo_Folder = @"/Users/ronny/DEV/0200-ObjC4/ModernTimes/DrawingFun/linen";
NSFileManager *fileManager = [NSFileManager defaultManager];
NSArray *theFiles = [fileManager contentsOfDirectoryAtURL:
[NSURL fileURLWithPath:pathTo_Folder]
includingPropertiesForKeys:[NSArray arrayWithObject:NSURLNameKey]
options:NSDirectoryEnumerationSkipsHiddenFiles
error:nil];
Run Code Online (Sandbox Code Playgroud)
来自瑞士的问候,罗纳德霍夫曼