-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding a triangle at the top of the screen in the middle that points …
…to the current page, making the font of the headers slightly bigger and bold, adding some more text to the demo headers in the demo app
- Loading branch information
Tom Thorpe
committed
Apr 16, 2013
1 parent
f974ffd
commit 51fea9f
Showing
5 changed files
with
107 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// TTBlackTriangle.h | ||
// UIScrollSlidingPages | ||
// | ||
// Created by Thomas Thorpe on 16/04/2013. | ||
// Copyright (c) 2013 Thomas Thorpe. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface TTBlackTriangle : UIView | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// TTBlackTriangle.m | ||
// UIScrollSlidingPages | ||
// | ||
// Created by Thomas Thorpe on 16/04/2013. | ||
// Copyright (c) 2013 Thomas Thorpe. All rights reserved. | ||
// | ||
|
||
#import "TTBlackTriangle.h" | ||
|
||
@implementation TTBlackTriangle | ||
|
||
- (id)initWithFrame:(CGRect)frame | ||
{ | ||
self = [super initWithFrame:frame]; | ||
if (self) { | ||
[self setBackgroundColor:[UIColor clearColor]]; | ||
} | ||
return self; | ||
} | ||
|
||
-(void)drawRect:(CGRect)rect | ||
{ | ||
CGContextRef ctx = UIGraphicsGetCurrentContext(); | ||
|
||
CGContextClearRect(ctx, rect); | ||
|
||
CGContextBeginPath(ctx); | ||
CGContextMoveToPoint (ctx, CGRectGetMinX(rect), CGRectGetMinY(rect)); // top left | ||
CGContextAddLineToPoint(ctx, CGRectGetMaxX(rect), CGRectGetMinY(rect)); // top right | ||
CGContextAddLineToPoint(ctx, CGRectGetMidX(rect), CGRectGetMaxY(rect)); // mid bottom | ||
CGContextClosePath(ctx); | ||
|
||
CGContextSetRGBFillColor(ctx, 0, 0, 0, 1); | ||
CGContextFillPath(ctx); | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters