在 iPhone 的 Coverflow 图像模板上显示标题
我在我的应用程序中使用 CoverFlow,它工作正常,但是,我需要显示出现在 coverflow 中的图像的标题,要添加图像,我使用以下代码...
loadImagesOperationQueue = [[NSOperationQueue alloc] init];
for (int i=0; i < 10; i++)
{
imageName = [[NSString alloc] initWithFormat:@"cover_%d.jpg", i];
[(AFOpenFlowView *)self.view setImage:[UIImage imageNamed:imageName] forIndex:i];
NSLog(@"my image name is %@",imageName);
NSLog(@"%d is the index",i);
}
[(AFOpenFlowView *)self.view setNumberOfImages:10];
任何人都可以帮助我。下面是屏幕截图我想实施。
I am using CoverFlow in my application ,it is working fine but, I need to display the title of image that appears to front in coverflow,To add images iam usinf following code...
loadImagesOperationQueue = [[NSOperationQueue alloc] init];
for (int i=0; i < 10; i++)
{
imageName = [[NSString alloc] initWithFormat:@"cover_%d.jpg", i];
[(AFOpenFlowView *)self.view setImage:[UIImage imageNamed:imageName] forIndex:i];
NSLog(@"my image name is %@",imageName);
NSLog(@"%d is the index",i);
}
[(AFOpenFlowView *)self.view setNumberOfImages:10];
Can any one help me out.Below is the screenshot I would like to implement.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的。你必须像下面这样传递:`
并且我传递图像名称,如下所示:
yes.U have to pass like below:`
and i pass the image name like below:
您只需在 openflow 代码中的 AFItemView.m 类的 method
- (id)initWithFrame:(CGRect)frame{}
中获取一个标签,并在方法- ( void)centerOnSelectedCover:(BOOL)animated{}
设置文本如下selectedCoverView.label.text=coverImagename;
。这对我有用。You simply take a label in method
- (id)initWithFrame:(CGRect)frame{}
for class AFItemView.m in openflow code and check in the class:AFOpenFlowView.m in method- (void)centerOnSelectedCover:(BOOL)animated{}
set text as belowselectedCoverView.label.text=coverImagename;
.This worked for me.