创建新风格外观的OSX应用:Modern Look OSX

jopen 10年前

这个项目的目的是提供一组简单和可定制的组件集。可用于创建新风格外观的OSX应用。

Sample

Here is the code of the MLTextField class.

- (void) commonInit {      self.font = [NSFont fontWithName:@"Helvetica Neue Light" size:16.0];      self.bordered = false;      self.backgroundColor = [NSColor clearColor];      self.focusRingType = NSFocusRingTypeNone;  }    - (void)drawRect:(NSRect)dirtyRect {      [NSGraphicsContext saveGraphicsState]; NSRect bounds = [self bounds];      [[NSColor blackColor] set]; NSBezierPath *bottomLine = [NSBezierPath bezierPath]; NSPoint p = NSZeroPoint;//bounds.origin; p.y = bounds.size.height;      [bottomLine moveToPoint:p];      p.x += bounds.size.width;      [bottomLine lineToPoint:p];      [bottomLine stroke];        [NSGraphicsContext restoreGraphicsState];      [super drawRect:dirtyRect];  }

项目主页:http://www.open-open.com/lib/view/home/1425127312874