我在启动时显示statusItem,如下所示:
theItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength] retain];
 NSString *theString = [textField stringValue];
 (textField.stringValue = theString);
    [theItem setTitle:theString];
    [theItem setHighlightMode:YES];
Run Code Online (Sandbox Code Playgroud)
文字看起来很模糊.如何清理文本的外观?
谢谢.
保罗
这是一个屏幕截图,顶部是数字菜单栏时钟,底部是NSStatusItem标题:

有没有一种很好的方法在分组表视图单元格上设置自定义选定的背景颜色?我不想制作四张图片并跟踪哪一张适合哪个细胞.
我会使用UITableViewCell的backgroundView和selectedBackgroundView属性,但它们打破了分组表视图样式的圆角.
现在,我有一个UITableViewCell子类来覆盖-setHighlighted:animated:和-setSelected:animated:切换单元格backgroundColor.这是完美的,除非它没有动画,即使它backgroundColor是一个动画属性,并且对它的更改包含在调用-beginAnimations:context:和-commitAnimations适当时.
我知道现代的Objective-C运行时可以合成ivars.我认为合成的ivars的行为与标记的ivars完全相同@private,但它们没有.
因此,代码仅在我预期可以处理的现代运行时下进行编译.例如,一个超类:
@interface A : NSObject {
#if !__OBJC2__
  @private
    NSString *_c;
#endif
}
@property (nonatomic, copy) NSString *d;
@end
@implementation A
@synthesize d=_c;
- (void)dealloc {
    [_c release];
    [super dealloc];
}
@end
Run Code Online (Sandbox Code Playgroud)
和子类:
@interface B : A {
#if !__OBJC2__
@private
    NSString *_c;
#endif
}
@property (nonatomic, copy) NSString *e;
@end
@implementation B
@synthesize e=_c;
- (void)dealloc {
    [_c release];
    [super dealloc];
}
@end
Run Code Online (Sandbox Code Playgroud)
即使超类的ivar是私有的,子类也不能具有与其超类的声明的ivar同名的声明的ivar.这似乎违反了我的意思@private,因为子类受到超类选择私有的影响.
然而,我更关心的是我应该如何看待合成的伊娃.我认为他们的行为就像宣布的私人伊娃,但没有脆弱的基类问题.也许这是正确的,我只是不明白脆弱的基类问题.为什么上面的代码只在现代运行时编译?当所有超类实例变量都是私有的时,是否存在脆弱的基类问题?