久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

從 imageview 點(diǎn)擊手勢(shì)獲取索引或標(biāo)簽值

get index or tag value from imageview tap gesture(從 imageview 點(diǎn)擊手勢(shì)獲取索引或標(biāo)簽值)
本文介紹了從 imageview 點(diǎn)擊手勢(shì)獲取索引或標(biāo)簽值的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

這是我們搜索任何應(yīng)用時(shí)來(lái)自應(yīng)用商店的圖片.我還想添加相同的滾動(dòng)視圖概念,在該概念中它顯示當(dāng)前圖像以及上一個(gè)和下一個(gè)圖像的小預(yù)覽.我能夠在 示例代碼.但是沒(méi)有找到當(dāng)用戶點(diǎn)擊任何圖像時(shí)如何獲取索引或標(biāo)記值的任何解決方案.這樣我就可以打開每個(gè)圖像的詳細(xì)信息頁(yè)面.如果有人對(duì)此有任何想法,請(qǐng)幫助我.

This is the image from app store whenever we search for any app. I also want to add the same scrollview concept in which it show the currentimage with small preview of previous and next image. I am able to make this view with the help of Sample code. But didn't find any solution that how to get index or tagvalue when user tap any of the image. So that I would be able to open the detail page for each image. If Someone has idea about this please help me.

提前致謝.

推薦答案

將手勢(shì)識(shí)別器添加到必要的圖像視圖中:

Add gesture recognizer to the necessary image view:

UITapGestureRecognizer *frameTapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(frameTapGesture:)];
[_imgView addGestureRecognizer:frameTapGesture];

然后在手勢(shì)處理程序中訪問(wèn)附加到的視圖手勢(shì)識(shí)別器:

Then in the gesture handler get access to the view gesture recognizer attached to:

- (void)frameTapGesture:(UITapGestureRecognizer*)sender
{
    UIView *view = sender.view; //cast pointer to the derived class if needed
    NSLog(@"%d", view.tag);
}

這篇關(guān)于從 imageview 點(diǎn)擊手勢(shì)獲取索引或標(biāo)簽值的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

iOS - Using storyboard and autolayout to center the UIScrollView(iOS - 使用故事板和自動(dòng)布局使 UIScrollView 居中)
UIScrollView not scrolling regardless of large contentSize(無(wú)論內(nèi)容大小如何,UIScrollView 都不會(huì)滾動(dòng))
Clean autorotation transitions in a paging UIScrollView(清除分頁(yè) UIScrollView 中的自動(dòng)旋轉(zhuǎn)轉(zhuǎn)換)
UIScrollView zooming with Auto Layout(UIScrollView 使用自動(dòng)布局縮放)
How to create an image from a UIView / UIScrollView(如何從 UIView/UIScrollView 創(chuàng)建圖像)
iOS/Swift - Hide/Show UITabBarController when scrolling down/up(iOS/Swift - 向下/向上滾動(dòng)時(shí)隱藏/顯示 UITabBarController)
主站蜘蛛池模板: 久久尤物免费一区二区三区 | av香港经典三级级 在线 | 国产日韩精品在线 | 黄色在线观看 | 国产成人综合久久 | 免费h在线 | 久久亚洲欧美日韩精品专区 | 免费观看毛片 | 国产精品一区二区久久 | 欧美激情精品久久久久久 | 日本超碰| 一区二区三区在线看 | 欧美一级二级三级视频 | 中文成人在线 | 国产精品欧美一区二区三区 | 日本一区二区高清不卡 | 国产激情视频 | av毛片在线播放 | 在线观看免费黄色片 | 午夜精品久久久久久久久久久久久 | 中文字幕成人在线 | 亚洲成人自拍 | 午夜看片 | 第一福利社区1024 | 中文字幕高清免费日韩视频在线 | www久久99 | 成人国产在线观看 | 久久精品97 | 人人人人人爽 | 国产欧美精品一区二区色综合朱莉 | 欧美精品中文字幕久久二区 | 天天草草草 | 天天看天天摸天天操 | 欧美性一区二区三区 | 国产精品久久久久久久久久久免费看 | 中文字幕视频一区二区 | 亚洲三区视频 | 国产亚洲一区二区三区在线 | 少妇无套高潮一二三区 | 久久久精品一区二区 | 草草草网站 |