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
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:@"cellIdentifier"]; | |
if (cell==nil) { | |
cell=[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cellIdentifier"]; | |
} | |
FlashLoad *flashLoad=[[FlashLoad alloc] initWithPlaceholder:[UIImage imageNamed:@"cinema.png"] inView:cell.imageView]; | |
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
#import "FlashLoad.h" | |
@implementation FlashLoad | |
-(id)initWithPlaceholder:(UIImage*)placeholder inView:(UIImageView*)imageView | |
{ | |
if (self==[super init]) { | |
__imageView=imageView; | |
[imageView setImage:placeholder]; | |
} |
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
#import <Foundation/Foundation.h> | |
@interface FlashLoad : NSObject | |
{ | |
UIImageView *__imageView; | |
NSURLConnection* connection; | |
NSMutableData* data; | |
} | |
-(id)initWithPlaceholder:(UIImage*)placeholder inView:(UIImageView*)imageView; | |
-(void)loadImageWithURL:(NSURL*)url; |
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
#import "LazyLoad.h" | |
@implementation LazyLoad | |
-(id)init{ | |
if (self==[super init]) { | |
UIImageView* imageView = [[UIImageView alloc] initWithFrame:self.frame]; | |
imageView.backgroundColor=[UIColor blueColor]; |
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
#import <UIKit/UIKit.h> | |
@interface LazyLoad : UIView | |
{ | |
NSURLConnection* connection; | |
NSMutableData* data; | |
} | |
- (void)loadImageFromURL:(NSURL*)url; | |
@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
// | |
// MyManager.m | |
// MobileTrading | |
// | |
// Created by Prince Kumar Sharma on 25/07/13. | |
// Copyright (c) 2013 Prince Kumar Sharma. All rights reserved. | |
// | |
#import "MyManager.h" |
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
// | |
// MyManager.h | |
// MobileTrading | |
// | |
// Created by Prince Kumar Sharma on 25/07/13. | |
// Copyright (c) 2013 Prince Kumar Sharma. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
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
- (void)viewDidLoad | |
{ | |
ATLabel *label=[[ATLabel alloc] init]; | |
[label setFrame:CGRectMake(10, 44, 300, 400)]; | |
label.center=self.view.center; | |
[label setText:@"Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."]; | |
[label setColor:[UIColor orangeColor] ForRange:NSMakeRange(0, 20)]; | |
[label setColor:[UIColor greenColor] ForRange:NSMakeRange(20, 20)]; |