简体   繁体   English

使用UIImageView制作类似iPhone的Photo Galerry的应用

[英]Using UIImageView to make a app like iPhone's Photo Galerry

Please help me ! 请帮我 ! I make an app like a slide show with back, previous button to change Image one by one. 我制作了一个带有幻灯片的应用,如带有后退,上一步按钮的幻灯片,以逐一更改图片。 But when I using large image it crash. 但是,当我使用大图像时,它会崩溃。 Now I'm using 64 jpg pics , size~20kb/1pic. 现在,我正在使用64张jpg图片,大小约为20kb / 1pic。

Help me or I die ! 救救我或我死! (U can add nick hoangtuanfithou, please) code like that : (您可以添加nick hoangtuanfithou)这样的代码:

//Init Image Array //初始化图像数组

-(void)InitImageArray1
{
myAnimationImages1 = [[NSMutableArray alloc] init];

for ( int i = 0; i < 24; i++ )
{
NSAutoreleasePool *poolArray=[[NSAutoreleasePool alloc] init];

NSString *fileName = [NSString stringWithFormat:@"001 (%d)",i];
image = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:fileName ofType:@”jpg”]];

[myAnimationImages1 addObject:image];
[poolArray release];
}

}

//Change Image self.mainImage.image = [self.myAnimationImages1 objectAtIndex:animationImageArrIndex]; //更改图片self.mainImage.image = [self.myAnimationImages1 objectAtIndex:animationImageArrIndex];

请参阅苹果的页面控制示例,或查看github上的滚动疯狂。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何像iPhone的照片应用程序一样实现删除动画 - How to implement delete animation like iPhone's photo app 如何制作不规则形状的uiview并将uiimageview放入instacollage iphone app之类的形状中 - how to make Irregular shape uiview and put uiimageview inside those shapes like instacollage iphone app 应用程序像iPhone中的默认照片浏览器一样? - App like default photo browser in iphone? 如何使导航栏像iPhone中的照片应用程序一样透明和淡出 - How to make a Navigation bar transparent and fade out like in the photo app in the iPhone 如何在iPhone应用程序中一起上传照片和照片说明? - How to upload photo and photo's description TOGETHER in iphone app? 如何使用iPhone SDK实现像Photo应用程序的可滑动图像堆栈? - How do you implement swipe-able image stacks like the Photo app using the iPhone SDK? 如何使按钮看起来像这样? (iPhone的计时器应用) - How to make a button look like this? (the iPhone's Timer App) 将图像从URL加载到uiimageview使iPhone应用程序性能降低 - Loading image from url to uiimageview make iphone app slower performance 创建多个图像视图,例如照片应用程序iphone sdk - create multiple images view like the photo app iphone sdk iPhone:如何通过iPhone照片应用程序等“编辑”功能从照片库或相机中获取图像 - iPhone:How to fetch image from photo library or camera with “edit” funcitionality like iPhone photo app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM