Skip to content

Instantly share code, notes, and snippets.

//
// TimeCounter.m
// SmoothCriminal
//
// Created by Prince Kumar Sharma on 05/07/13.
// Copyright (c) 2013 Prince Kumar Sharma. All rights reserved.
//
#import "TimeCounter.h"
#import <QuartzCore/QuartzCore.h>
//
// TimeCounter.h
// SmoothCriminal
//
// Created by Prince Kumar Sharma on 05/07/13.
// Copyright (c) 2013 Prince Kumar Sharma. All rights reserved.
//
#import <UIKit/UIKit.h>
// Created by Prince Kumar Sharma on 20/02/13.
// Copyright (c) 2012 Prince Kumar Sharma. All rights reserved.
#import <UIKit/UIKit.h>
@class StockTiker;
@protocol UIStockTickerDelegate<NSObject>
@required
// Created by Prince Kumar Sharma on 20/02/13.
// Copyright (c) 2012 Prince Kumar Sharma. All rights reserved.
#import "StockTiker.h"
@implementation StockTiker
@synthesize tdelegate=_tdelegate;
@synthesize ttag=_ttag;
-(void)setGradientToSlider:(UISlider*)slider WithColors:(NSArray*)colorArray
{
UIView *view=(UIView*)[slider.subviews objectAtIndex:0];
UIImageView *max_trackImageView=(UIImageView*)[view.subviews objectAtIndex:0];
//setting gradient to max track image view.
CAGradientLayer* max_trackGradient = [CAGradientLayer layer];
CGRect rect=max_trackImageView.frame;
-(void)viewDidAppear:(BOOL)animated
{
NSArray *colorArray=[NSArray arrayWithObjects:(id)[[UIColor redColor] CGColor],(id)[[UIColor greenColor] CGColor], (id)[[UIColor blueColor] CGColor],(id)[[UIColor magentaColor] CGColor],(id)[[UIColor purpleColor] CGColor],(id)[[UIColor yellowColor] CGColor],(id)[[UIColor orangeColor] CGColor],(id)[[UIColor brownColor] CGColor], nil];
[_slider setThumbTintColor:[UIColor greenColor]];
[self setGradientToSlider:_slider WithColors:colorArray];
}
#import <UIKit/UIKit.h>
#import "QuartzCore/QuartzCore.h"
#import "UIColor-Expanded.h"
@interface GetColorCodesViewController : UIViewController
{
__block NSMutableDictionary *colorCodes;
}
@property (strong, nonatomic) IBOutlet UIView *colorView;
@property (strong, nonatomic) IBOutlet UILabel *R;
#import "GetColorCodesViewController.h"
@interface GetColorCodesViewController ()
@end
@implementation GetColorCodesViewController
- (void)viewDidLoad
{
#import <UIKit/UIKit.h>
#import "CoreText/CoreText.h"
@interface ATLabel : UILabel
{
NSMutableArray *crArray;
NSMutableArray *frArray;
}
-(void)setColor:(UIColor*)color ForRange:(NSRange)range;
-(void)setFont:(UIFont*)font ForRange:(NSRange)range;
#import "ATLabel.h"
@implementation ATLabel
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
crArray=[[NSMutableArray alloc] init];
frArray=[[NSMutableArray alloc] init];
[self setBackgroundColor:[UIColor clearColor]];