Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated ExampleProject

  • Loading branch information...
commit 53cadadeeb0953a0e55df268523887a7fb199644 1 parent ce1fef3
@jspahrsummers jspahrsummers authored
View
2  ExampleProject/ConcordeExample/ExampleScrollView.m
@@ -21,7 +21,7 @@ @implementation ExampleScrollView
- (id)initWithFrame:(CGRect)frame
{
if((self = [super initWithFrame:frame])) {
- self.backgroundColor = [TUIColor colorWithWhite:0.9 alpha:1.0];
+ self.backgroundColor = [NSColor colorWithCalibratedWhite:0.9 alpha:1.0];
_scrollView = [[TUIScrollView alloc] initWithFrame:self.bounds];
_scrollView.autoresizingMask = TUIViewAutoresizingFlexibleSize;
View
2  ExampleProject/ConcordeExample/ExampleTableViewCell.m
@@ -40,7 +40,7 @@ - (id)initWithStyle:(TUITableViewCellStyle)style reuseIdentifier:(NSString *)reu
[textField.cell setScrollable:YES];
self.textFieldContainer = [[TUIViewNSViewContainer alloc] initWithNSView:textField];
- self.textFieldContainer.backgroundColor = [TUIColor blueColor];
+ self.textFieldContainer.backgroundColor = [NSColor blueColor];
[self addSubview:self.textFieldContainer];
}
return self;
View
10 ExampleProject/ConcordeExample/ExampleView.m
@@ -25,7 +25,7 @@ @implementation ExampleView
- (id)initWithFrame:(CGRect)frame
{
if((self = [super initWithFrame:frame])) {
- self.backgroundColor = [TUIColor colorWithWhite:0.9 alpha:1.0];
+ self.backgroundColor = [NSColor colorWithCalibratedWhite:0.9 alpha:1.0];
// if you're using a font a lot, it's best to allocate it once and re-use it
exampleFont1 = [NSFont fontWithName:@"HelveticaNeue" size:15];
@@ -60,7 +60,7 @@ Note by default scroll views (and therefore table views) don't
// setup individual tabs
for(TUIView *tabView in _tabBar.tabViews) {
- tabView.backgroundColor = [TUIColor clearColor]; // will also set opaque=NO
+ tabView.backgroundColor = [NSColor clearColor]; // will also set opaque=NO
// let's just teach the tabs how to draw themselves right here - no need to subclass anything
tabView.drawRect = ^(TUIView *v, CGRect rect) {
@@ -92,7 +92,7 @@ Note by default scroll views (and therefore table views) don't
CGContextClipToMask(ctx, r, image.tui_CGImage);
CGContextDrawLinearGradientBetweenPoints(ctx, CGPointMake(0, r.size.height), (CGFloat[]){0,0,1,1}, CGPointZero, (CGFloat[]){0,0.6,1,1});
- NSImage *innerShadow = [image tui_innerShadowWithOffset:CGSizeMake(0, -1) radius:3.0 color:[TUIColor blackColor] backgroundColor:[TUIColor cyanColor]];
+ NSImage *innerShadow = [image tui_innerShadowWithOffset:CGSizeMake(0, -1) radius:3.0 color:[NSColor blackColor] backgroundColor:[NSColor cyanColor]];
CGContextSetBlendMode(ctx, kCGBlendModeOverlay);
CGContextDrawImage(ctx, r, innerShadow.tui_CGImage);
}];
@@ -138,7 +138,7 @@ - (TUIView *)tableView:(TUITableView *)tableView headerViewForSection:(NSInteger
{
ExampleSectionHeaderView *view = [[ExampleSectionHeaderView alloc] initWithFrame:CGRectMake(0, 0, 100, 32)];
TUIAttributedString *title = [TUIAttributedString stringWithString:[NSString stringWithFormat:@"Example Section %d", (int)section]];
- title.color = [TUIColor blackColor];
+ title.color = [NSColor blackColor];
title.font = exampleFont2;
view.labelRenderer.attributedString = title;
return view;
@@ -149,7 +149,7 @@ - (TUITableViewCell *)tableView:(TUITableView *)tableView cellForRowAtIndexPath:
ExampleTableViewCell *cell = reusableTableCellOfClass(tableView, ExampleTableViewCell);
TUIAttributedString *s = [TUIAttributedString stringWithString:[NSString stringWithFormat:@"example cell %d", (int)indexPath.row]];
- s.color = [TUIColor blackColor];
+ s.color = [NSColor blackColor];
s.font = exampleFont1;
[s setFont:exampleFont2 inRange:NSMakeRange(8, 4)]; // make the word "cell" bold
cell.attributedString = s;

0 comments on commit 53cadad

Please sign in to comment.
Something went wrong with that request. Please try again.