Skip to content

Commit 94fa438

Browse files
committed
update readme
1 parent 58e88a0 commit 94fa438

File tree

7 files changed

+20
-133
lines changed

7 files changed

+20
-133
lines changed

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,23 @@ YLGIFImage
33

44
Asynchronized GIF image class and Image viewer supporting play/stop GIF images.
55

6-
It just use very less memory. Following GIF usually will cost almost 1GB memory if it is fully decoded, but using YLGIFImage, it just use about 30MB memory.
6+
It just use very less memory. Following GIF usually will cost almost 600MB memory if it is fully decoded (800x600x389x4 Bytes), but using YLGIFImage, it just use about 30MB memory.
77

8-
![Joy](./YLGIFImageDemo/YLGIFImageDemo/joy.gif "Joy")
8+
->![Joy](./YLGIFImageDemo/YLGIFImageDemo/joy.gif =320x240)<-
99

10+
For this gif file, iOS Pinterest also will crash, but using YLGIFImage, it won't!
11+
12+
####Using it
13+
For using YLGIFImage, it's very simple:
14+
15+
YLImageView* imageView = [[YLImageView alloc] initWithFrame:CGRectMake(0, 160, 320, 240)];
16+
[self.view addSubview:imageView];
17+
imageView.image = [YLGIFImage imageNamed:@"joy.gif"];
18+
19+
Here is the demo looks like:
20+
21+
->![Screenshot](./screenshot.png =320x568)<-
1022

1123
Thanks
1224
==========
13-
Thanks to [OLImageView](https://github.com/ondalabs/OLImageView)! I referred a lot to this project.
25+
Thanks to [OLImageView](https://github.com/ondalabs/OLImageView)! I referred a lot to this project, especially using NSDisplay.

YLGIFImageDemo/YLGIFImageDemo.xcodeproj/xcuserdata/liyong03.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

Lines changed: 0 additions & 5 deletions
This file was deleted.

YLGIFImageDemo/YLGIFImageDemo.xcodeproj/xcuserdata/liyong03.xcuserdatad/xcschemes/YLGIFImageDemo.xcscheme

Lines changed: 0 additions & 96 deletions
This file was deleted.

YLGIFImageDemo/YLGIFImageDemo.xcodeproj/xcuserdata/liyong03.xcuserdatad/xcschemes/xcschememanagement.plist

Lines changed: 0 additions & 27 deletions
This file was deleted.

YLGIFImageDemo/YLGIFImageDemo/DemoViewController.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ - (void)viewDidLoad
3030
[super viewDidLoad];
3131
// Do any additional setup after loading the view.
3232

33-
YLImageView* imageView = [[YLImageView alloc] initWithFrame:CGRectMake(0, 50, 320, 240)];
33+
self.title = @"YLGIFImageDemo";
34+
35+
YLImageView* imageView = [[YLImageView alloc] initWithFrame:CGRectMake(0, 160, 320, 240)];
3436
[self.view addSubview:imageView];
3537
imageView.image = [YLGIFImage imageNamed:@"joy.gif"];
3638
}

YLGIFImageDemo/YLGIFImageDemo/YLAppDelegate.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
1616
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
1717
// Override point for customization after application launch.
1818
self.window.backgroundColor = [UIColor whiteColor];
19-
self.window.rootViewController = [[DemoViewController alloc] init];
19+
UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:[[DemoViewController alloc] init]];
20+
self.window.rootViewController = navi;
2021
[self.window makeKeyAndVisible];
2122
return YES;
2223
}

screenshot.png

196 KB
Loading

0 commit comments

Comments
 (0)