AFOpenFlow touchevent 图片

发布于 2024-09-27 02:41:29 字数 823 浏览 1 评论 0原文

有谁知道我可以在这段代码中实现的解决方案, 可以触摸这些照片并开始一个活动吗?

- (void)viewDidLoad {
    [super viewDidLoad];

    // loading images into the queue

    loadImagesOperationQueue = [[NSOperationQueue alloc] init];

    NSString *imageName;
    for (int i=0; i < 10; i++) {
        imageName = [[NSString alloc] initWithFormat:@"cover_%d.jpg", i];
        imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:imageName]];
        UIImage *aktuellesImage = imageView.image;
        UIImage *scaledImage = [aktuellesImage scaleToSize:CGSizeMake(100.0f, 100.0f)];
        [(AFOpenFlowView *)self.view setImage:scaledImage forIndex:i];
        [imageName release];
        [aktuellesImage release];       
    }
    [(AFOpenFlowView *)self.view setNumberOfImages:10];


}

我希望有人能帮助我并且 抱歉我的英语不好:)

does anybody know a solution that i could implement at this code,
that the pictures could be touched and an event will be started?

- (void)viewDidLoad {
    [super viewDidLoad];

    // loading images into the queue

    loadImagesOperationQueue = [[NSOperationQueue alloc] init];

    NSString *imageName;
    for (int i=0; i < 10; i++) {
        imageName = [[NSString alloc] initWithFormat:@"cover_%d.jpg", i];
        imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:imageName]];
        UIImage *aktuellesImage = imageView.image;
        UIImage *scaledImage = [aktuellesImage scaleToSize:CGSizeMake(100.0f, 100.0f)];
        [(AFOpenFlowView *)self.view setImage:scaledImage forIndex:i];
        [imageName release];
        [aktuellesImage release];       
    }
    [(AFOpenFlowView *)self.view setNumberOfImages:10];


}

I hope someone could help me and
sorry for my bad english :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

过气美图社 2024-10-04 02:41:29

在 AFOpenFlowView.m 方法中,touchesBegan、touchMoves 和 touchEnded 已被覆盖,因此只需创建一个新的委托方法供您使用并调整这些方法即可。

in AFOpenFlowView.m methods touchesBegan, touchMoves and touchEnded are already overriden, so just create a new delegate method for your usage and adapt these methods.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文