Skip to content

Instantly share code, notes, and snippets.

- (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];
#import "FlashLoad.h"
@implementation FlashLoad
-(id)initWithPlaceholder:(UIImage*)placeholder inView:(UIImageView*)imageView
{
if (self==[super init]) {
__imageView=imageView;
[imageView setImage:placeholder];
}
#import <Foundation/Foundation.h>
@interface FlashLoad : NSObject
{
UIImageView *__imageView;
NSURLConnection* connection;
NSMutableData* data;
}
-(id)initWithPlaceholder:(UIImage*)placeholder inView:(UIImageView*)imageView;
-(void)loadImageWithURL:(NSURL*)url;
#import "LazyLoad.h"
@implementation LazyLoad
-(id)init{
if (self==[super init]) {
UIImageView* imageView = [[UIImageView alloc] initWithFrame:self.frame];
imageView.backgroundColor=[UIColor blueColor];
#import <UIKit/UIKit.h>
@interface LazyLoad : UIView
{
NSURLConnection* connection;
NSMutableData* data;
}
- (void)loadImageFromURL:(NSURL*)url;
@end
#import "SharedManager.h"
NSString *filePath;
@implementation SharedManager
#pragma mark Creating Shared Instance.
+ (id)sharedManager {
static SharedManager *sharedMyManager = nil;
// SharedManager.h
// Demo
//
// Created by Prince Kumar Sharma on 02/08/13.
// Copyright (c) 2013 Prince Kumar Sharma. All rights reserved.
#import <Foundation/Foundation.h>
@interface SharedManager : NSObject
//
// MyManager.m
// MobileTrading
//
// Created by Prince Kumar Sharma on 25/07/13.
// Copyright (c) 2013 Prince Kumar Sharma. All rights reserved.
//
#import "MyManager.h"
//
// 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>
- (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)];